From d0b52139edcc44afcea727503f029afc1d7848f6 Mon Sep 17 00:00:00 2001 From: Johan Malm Date: Sun, 2 Jul 2023 21:20:04 +0100 Subject: [PATCH] action.c: remove duplicate code --- src/action.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/action.c b/src/action.c index 11cb6fcf..dc06bdf0 100644 --- a/src/action.c +++ b/src/action.c @@ -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")) { - /* - * foo - * is deprecated, but we support it anyway for backward - * compatibility with old openbox-menu generators - */ + /* + * with an 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; } -- 2.52.0