]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
nss: drop dummy setup_logging() helpers
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 11 Jan 2022 12:23:27 +0000 (13:23 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Tue, 11 Jan 2022 12:39:52 +0000 (13:39 +0100)
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.

src/nss-mymachines/nss-mymachines.c
src/nss-systemd/nss-systemd.c

index 44715bb3e5d81b371d59468f99743967ea522848..781fd48d72ed7f48c1b2661aa4baf8e7d0b113ee 100644 (file)
 #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                    \
index 36486b96e397b358b454675475abf0b2a73c4514..c6c00c40e648d28ac213201be960e0f26458a4f2 100644 (file)
@@ -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                    \