From: Zbigniew Jędrzejewski-Szmek Date: Tue, 11 Jan 2022 12:23:27 +0000 (+0100) Subject: nss: drop dummy setup_logging() helpers X-Git-Tag: v251-rc1~552^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=56a5f4969b96529c82ec8cc08db4fa8e9c61e7b9;p=thirdparty%2Fsystemd.git nss: drop dummy setup_logging() helpers log_parse_environment() stopped being a macro in 9fdee66f2d9. As reported by @bauen1 in https://github.com/systemd/systemd/issues/22020, the comment was out of date. --- diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c index 44715bb3e5d..781fd48d72e 100644 --- a/src/nss-mymachines/nss-mymachines.c +++ b/src/nss-mymachines/nss-mymachines.c @@ -22,14 +22,9 @@ #include "signal-util.h" #include "string-util.h" -static void setup_logging(void) { - /* We need a dummy function because log_parse_environment is a macro. */ - log_parse_environment(); -} - static void setup_logging_once(void) { static pthread_once_t once = PTHREAD_ONCE_INIT; - assert_se(pthread_once(&once, setup_logging) == 0); + assert_se(pthread_once(&once, log_parse_environment) == 0); } #define NSS_ENTRYPOINT_BEGIN \ diff --git a/src/nss-systemd/nss-systemd.c b/src/nss-systemd/nss-systemd.c index 36486b96e39..c6c00c40e64 100644 --- a/src/nss-systemd/nss-systemd.c +++ b/src/nss-systemd/nss-systemd.c @@ -116,14 +116,9 @@ static GetentData getsgent_data = { .mutex = PTHREAD_MUTEX_INITIALIZER, }; -static void setup_logging(void) { - /* We need a dummy function because log_parse_environment is a macro. */ - log_parse_environment(); -} - static void setup_logging_once(void) { static pthread_once_t once = PTHREAD_ONCE_INIT; - assert_se(pthread_once(&once, setup_logging) == 0); + assert_se(pthread_once(&once, log_parse_environment) == 0); } #define NSS_ENTRYPOINT_BEGIN \