From: Alejandro Colomar Date: Wed, 23 Jul 2025 00:23:57 +0000 (+0200) Subject: lib/io/syslog.h: SYSLOG_C(): Call setlocale(3) and free(3) unconditionally X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=df62f34575aa488e31c66f7d04ceefb7838d9f1e;p=thirdparty%2Fshadow.git lib/io/syslog.h: SYSLOG_C(): Call setlocale(3) and free(3) unconditionally Both setlocale(3) and free(3) are okay to call with a null pointer. Signed-off-by: Alejandro Colomar --- diff --git a/lib/io/syslog.h b/lib/io/syslog.h index db05c31b6..73fcfe26e 100644 --- a/lib/io/syslog.h +++ b/lib/io/syslog.h @@ -59,10 +59,9 @@ setlocale(LC_ALL, "C"); \ \ syslog(__VA_ARGS__); \ - if (NULL != l_) { \ - setlocale(LC_ALL, l_); \ - free(l_); \ - } \ + \ + setlocale(LC_ALL, l_); \ + free(l_); \ } while (0)