chiark / gitweb /
strv: introduce new strv_from_stdarg_alloca() macro to generate a string array from...
[elogind.git] / src / core / execute.c
index 8f09233e3ea5ee0b4b1f8fb10aea902bcb2bb621..3ae28ee080af0531863c13da866d393c826f1474 100644 (file)
@@ -1089,7 +1089,7 @@ int exec_spawn(ExecCommand *command,
         free(line);
 
         if (context->private_tmp && !context->tmp_dir && !context->var_tmp_dir) {
-                r = setup_tmpdirs(&context->tmp_dir, &context->var_tmp_dir);
+                r = setup_tmpdirs(unit_id, &context->tmp_dir, &context->var_tmp_dir);
                 if (r < 0)
                         return r;
         }
@@ -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;
         }