diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-02-14 01:05:55 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-02-14 01:05:55 +0100 |
commit | a6a80b4f440bcc1c6087572503c08a72ee674075 (patch) | |
tree | a3764b68a7328fde5be458a2d3a76aea9c9da44e /load-fragment.c | |
parent | c18315a88da3864f29908ad299750f98e6160f42 (diff) |
execute: simplify appending to execution list
Diffstat (limited to 'load-fragment.c')
-rw-r--r-- | load-fragment.c | 9 |
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; |