From: Tobias Stoeckmann Date: Fri, 13 Sep 2024 22:17:45 +0000 (+0200) Subject: lib/run_part: Adjust style X-Git-Tag: 4.17.0-rc1~70 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dd6cddd481c38b824087aba7be86f58b3985fe45;p=thirdparty%2Fshadow.git lib/run_part: Adjust style Remove some of these whitespaces. Signed-off-by: Tobias Stoeckmann --- diff --git a/lib/run_part.c b/lib/run_part.c index d848d2f4b..b271f4ce8 100644 --- a/lib/run_part.c +++ b/lib/run_part.c @@ -15,7 +15,7 @@ #include "shadowlog_internal.h" -static int run_part (char *script_path, const char *name, const char *action) +static int run_part(char *script_path, const char *name, const char *action) { pid_t pid; int wait_status; @@ -24,34 +24,34 @@ static int run_part (char *script_path, const char *name, const char *action) pid=fork(); if (pid==-1) { - fprintf (shadow_logfd, "fork: %s\n", strerror(errno)); + fprintf(shadow_logfd, "fork: %s\n", strerror(errno)); return 1; } if (pid==0) { - setenv ("ACTION",action,1); - setenv ("SUBJECT",name,1); - execv (script_path,args); - fprintf (shadow_logfd, "execv: %s\n", strerror(errno)); + setenv("ACTION",action,1); + setenv("SUBJECT",name,1); + execv(script_path,args); + fprintf(shadow_logfd, "execv: %s\n", strerror(errno)); exit(1); } - pid_status = wait (&wait_status); + pid_status = wait(&wait_status); if (pid_status == pid) { return (wait_status); } - fprintf (shadow_logfd, "waitpid: %s\n", strerror(errno)); + fprintf(shadow_logfd, "waitpid: %s\n", strerror(errno)); return (1); } -int run_parts (const char *directory, const char *name, const char *action) +int run_parts(const char *directory, const char *name, const char *action) { struct dirent **namelist; int scanlist; int n; int execute_result = 0; - scanlist = scandir (directory, &namelist, 0, alphasort); + scanlist = scandir(directory, &namelist, 0, alphasort); if (scanlist<=0) { return (0); } @@ -61,7 +61,7 @@ int run_parts (const char *directory, const char *name, const char *action) struct stat sb; if (asprintf(&s, "%s/%s", directory, namelist[n]->d_name) == -1) { - fprintf (shadow_logfd, "asprintf: %s\n", strerror(errno)); + fprintf(shadow_logfd, "asprintf: %s\n", strerror(errno)); for (; nd_name); for (; n