X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Factivate%2Factivate.c;h=83d25b13af9063e4c875c95e51b48c4e160644fd;hb=fecffe5d0a1bd66d80e5a8728ff8a89673be0df7;hp=3ea2470a1faa93361576095ad3388a1cabd21d21;hpb=fff40a51ccbb02e8dec4ff2ee505bc84f75e445c;p=elogind.git diff --git a/src/activate/activate.c b/src/activate/activate.c index 3ea2470a1..83d25b13a 100644 --- a/src/activate/activate.c +++ b/src/activate/activate.c @@ -171,10 +171,10 @@ static int open_sockets(int *epoll_fd, bool accept) { static int launch(char* name, char **argv, char **env, int fds) { unsigned n_env = 0, length; - char _cleanup_strv_free_ **envp = NULL; + _cleanup_strv_free_ char **envp = NULL; char **s; static const char* tocopy[] = {"TERM=", "PATH=", "USER=", "HOME="}; - char _cleanup_free_ *tmp = NULL; + _cleanup_free_ char *tmp = NULL; unsigned i; length = strv_length(arg_environ); @@ -185,7 +185,7 @@ static int launch(char* name, char **argv, char **env, int fds) { if (strchr(*s, '=')) envp[n_env++] = *s; else { - char _cleanup_free_ *p = strappend(*s, "="); + _cleanup_free_ char *p = strappend(*s, "="); if (!p) return log_oom(); envp[n_env] = strv_find_prefix(env, p); @@ -218,7 +218,7 @@ static int launch1(const char* child, char** argv, char **env, int fd) { pid_t parent_pid, child_pid; int r; - char _cleanup_free_ *tmp = NULL; + _cleanup_free_ char *tmp = NULL; tmp = strv_join(argv, " "); if (!tmp) return log_oom(); @@ -290,16 +290,15 @@ static int do_accept(const char* name, char **argv, char **envp, int fd) { } /* SIGCHLD handler. */ -static void sigchld_hdl(int sig, siginfo_t *t, void *data) -{ +static void sigchld_hdl(int sig, siginfo_t *t, void *data) { log_info("Child %d died with code %d", t->si_pid, t->si_status); - /* Wait for a dead child. */ - waitpid(t->si_pid, NULL, 0); + /* Wait for a dead child. */ + waitpid(t->si_pid, NULL, 0); } static int install_chld_handler(void) { int r; - struct sigaction act; + struct sigaction act; zero(act); act.sa_flags = SA_SIGINFO; act.sa_sigaction = sigchld_hdl;