From: Tobias Stoeckmann Date: Fri, 13 Sep 2024 22:14:20 +0000 (+0200) Subject: lib/run_part: Unify error messages X-Git-Tag: 4.17.0-rc1~71 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=76c97ed7ecb9d9ed1bdb3576d4e60bebc12bd42a;p=thirdparty%2Fshadow.git lib/run_part: Unify error messages At least if they can be assigned directly to a function call. Signed-off-by: Tobias Stoeckmann --- diff --git a/lib/run_part.c b/lib/run_part.c index c5d4bd9e9..d848d2f4b 100644 --- a/lib/run_part.c +++ b/lib/run_part.c @@ -24,7 +24,7 @@ static int run_part (char *script_path, const char *name, const char *action) pid=fork(); if (pid==-1) { - fprintf (shadow_logfd, "Could not fork: %s\n", strerror(errno)); + fprintf (shadow_logfd, "fork: %s\n", strerror(errno)); return 1; } if (pid==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, "could not allocate memory\n"); + fprintf (shadow_logfd, "asprintf: %s\n", strerror(errno)); for (; n