X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fexecute.c;h=1e571da69c5e74d5a726f204933924cf308e9747;hb=e55001ebba6f6ad7d63db249f7bf93f25be12acd;hp=3f7ca52139801ddc2606257100fa4d07b1618719;hpb=970edce6efcd3a0cf284aa0f43e0b27ecbd415f5;p=elogind.git diff --git a/src/core/execute.c b/src/core/execute.c index 3f7ca5213..1e571da69 100644 --- a/src/core/execute.c +++ b/src/core/execute.c @@ -155,7 +155,7 @@ _pure_ static const char *tty_path(const ExecContext *context) { return "/dev/console"; } -void exec_context_tty_reset(const ExecContext *context) { +static void exec_context_tty_reset(const ExecContext *context) { assert(context); if (context->tty_vhangup) @@ -511,7 +511,7 @@ fail: return r; } -_printf_attr_(1, 2) static int write_confirm_message(const char *format, ...) { +_printf_(1, 2) static int write_confirm_message(const char *format, ...) { int fd; va_list ap; @@ -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; } @@ -1706,7 +1706,7 @@ void exec_command_free_list(ExecCommand *c) { ExecCommand *i; while ((i = c)) { - LIST_REMOVE(ExecCommand, command, c, i); + LIST_REMOVE(command, c, i); exec_command_done(i); free(i); } @@ -2194,8 +2194,8 @@ void exec_command_append_list(ExecCommand **l, ExecCommand *e) { if (*l) { /* It's kind of important, that we keep the order here */ - LIST_FIND_TAIL(ExecCommand, command, *l, end); - LIST_INSERT_AFTER(ExecCommand, command, *l, end, e); + LIST_FIND_TAIL(command, *l, end); + LIST_INSERT_AFTER(command, *l, end, e); } else *l = e; } @@ -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; }