nwrap: Move nwrap_thread_*() to the end
authorAndreas Schneider <asn@samba.org>
Fri, 4 Nov 2022 12:52:05 +0000 (13:52 +0100)
committerAndreas Schneider <asn@samba.org>
Fri, 4 Nov 2022 13:41:50 +0000 (14:41 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
src/nss_wrapper.c

index 9541365caf47c718847ea47860fe609c817653cf..66df98ef3b4ec90afde549f70a709277a5277e46 100644 (file)
@@ -226,22 +226,6 @@ static pthread_mutex_t nwrap_sp_global_mutex = PTHREAD_MUTEX_INITIALIZER;
 
 static void nwrap_init(void);
 
-static void nwrap_thread_prepare(void)
-{
-       nwrap_init();
-       NWRAP_LOCK_ALL;
-}
-
-static void nwrap_thread_parent(void)
-{
-       NWRAP_UNLOCK_ALL;
-}
-
-static void nwrap_thread_child(void)
-{
-       NWRAP_UNLOCK_ALL;
-}
-
 enum nwrap_dbglvl_e {
        NWRAP_LOG_ERROR = 0,
        NWRAP_LOG_WARN,
@@ -6357,6 +6341,22 @@ int gethostname(char *name, size_t len)
        return nwrap_gethostname(name, len);
 }
 
+static void nwrap_thread_prepare(void)
+{
+       nwrap_init();
+       NWRAP_LOCK_ALL;
+}
+
+static void nwrap_thread_parent(void)
+{
+       NWRAP_UNLOCK_ALL;
+}
+
+static void nwrap_thread_child(void)
+{
+       NWRAP_UNLOCK_ALL;
+}
+
 /****************************
  * CONSTRUCTOR
  ***************************/