summaryrefslogtreecommitdiff
path: root/load-fragment.c
diff options
context:
space:
mode:
Diffstat (limited to 'load-fragment.c')
-rw-r--r--load-fragment.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/load-fragment.c b/load-fragment.c
index 4183b5c8fa..9bc9b2b6a1 100644
--- a/load-fragment.c
+++ b/load-fragment.c
@@ -328,7 +328,7 @@ static int config_parse_exec(
void *data,
void *userdata) {
- ExecCommand **e = data, *ee, *nce = NULL;
+ ExecCommand **e = data, *nce = NULL;
char **n;
char *w;
unsigned k;
@@ -367,12 +367,7 @@ static int config_parse_exec(
if (!(nce->path = strdup(n[0])))
goto fail;
- if (*e) {
- /* It's kinda important that we keep the order here */
- LIST_FIND_TAIL(ExecCommand, command, *e, ee);
- LIST_INSERT_AFTER(ExecCommand, command, *e, ee, nce);
- } else
- *e = nce;
+ exec_command_append_list(e, nce);
return 0;