action.c: remove duplicate code

This commit is contained in:
Johan Malm 2023-07-02 21:20:04 +01:00 committed by Johan Malm
parent 49dfba1507
commit d0b52139ed

View file

@ -168,15 +168,12 @@ action_arg_from_xml_node(struct action *action, char *nodename, char *content)
switch (action->type) {
case ACTION_TYPE_EXECUTE:
if (!strcmp(argument, "command")) {
action_arg_add_str(action, argument, content);
goto cleanup;
} else if (!strcmp(argument, "execute")) {
/*
* <action name="Execute"><execute>foo</execute></action>
* is deprecated, but we support it anyway for backward
* compatibility with old openbox-menu generators
*/
/*
* <action name="Execute"> with an <execute> child is
* deprecated, but we support it anyway for backward
* compatibility with old openbox-menu generators
*/
if (!strcmp(argument, "command") || !strcmp(argument, "execute")) {
action_arg_add_str(action, "command", content);
goto cleanup;
}