From: Alejandro Colomar Date: Wed, 24 Dec 2025 10:20:53 +0000 (+0100) Subject: lib/copydir.c: error_acl(): Use vfprintec() instead of its pattern X-Git-Tag: 4.20.0-rc3~29 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=93c675ef030e4eb226f60a317f3759755cd5bc5d;p=thirdparty%2Fshadow.git lib/copydir.c: error_acl(): Use vfprintec() instead of its pattern Signed-off-by: Alejandro Colomar --- diff --git a/lib/copydir.c b/lib/copydir.c index 47ea9f281..42e9e7332 100644 --- a/lib/copydir.c +++ b/lib/copydir.c @@ -19,6 +19,7 @@ #include "alloc/malloc.h" #include "attr.h" #include "fs/readlink/areadlink.h" +#include "io/fprintf.h" #include "prototypes.h" #include "defines.h" #ifdef WITH_SELINUX @@ -106,10 +107,7 @@ error_acl(MAYBE_UNUSED struct error_context *_1, const char *fmt, ...) va_start (ap, fmt); (void) fprintf (log_get_logfd(), _("%s: "), log_get_progname()); - if (vfprintf (log_get_logfd(), fmt, ap) != 0) { - (void) fputs (_(": "), log_get_logfd()); - } - (void) fprintf(log_get_logfd(), "%s\n", strerror(e)); + vfprintec(log_get_logfd(), e, fmt, ap); va_end (ap); errno = e;