summaryrefslogtreecommitdiff
path: root/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-02-14 01:05:55 +0100
committerLennart Poettering <lennart@poettering.net>2010-02-14 01:05:55 +0100
commita6a80b4f440bcc1c6087572503c08a72ee674075 (patch)
treea3764b68a7328fde5be458a2d3a76aea9c9da44e /load-fragment.c
parentc18315a88da3864f29908ad299750f98e6160f42 (diff)
execute: simplify appending to execution list
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;