summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-10-29 19:53:43 +0100
committerLennart Poettering <lennart@poettering.net>2013-10-29 19:53:43 +0100
commit250a918dc4c8a15d927deecc3b3f6a0604657ae4 (patch)
tree18faf995d700c26c67ad500b81e7cce007bc0b95 /src/core
parent7b1132f60d2a447c31556c23ea90ea31447ac557 (diff)
strv: introduce new strv_from_stdarg_alloca() macro to generate a string array from stdarg function parameters
This allows us to turn lists of strings passed in easily into string arrays without having to allocate memory.
Diffstat (limited to 'src/core')
-rw-r--r--src/core/execute.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/execute.c b/src/core/execute.c
index e04f46f036..3ae28ee080 100644
--- a/src/core/execute.c
+++ b/src/core/execute.c
@@ -2214,7 +2214,8 @@ int exec_command_set(ExecCommand *c, const char *path, ...) {
if (!l)
return -ENOMEM;
- if (!(p = strdup(path))) {
+ p = strdup(path);
+ if (!p) {
strv_free(l);
return -ENOMEM;
}