Fix definition of smb_thread_once - must return int not void as
authorJeremy Allison <jra@samba.org>
Tue, 12 May 2009 05:33:32 +0000 (22:33 -0700)
committerJeremy Allison <jra@samba.org>
Tue, 12 May 2009 05:33:32 +0000 (22:33 -0700)
it's used in a ? : comparison macro.
Jeremy.

lib/util/smb_threads.c
lib/util/smb_threads.h

index 22afcd378f271f0211c70e42a675dc9488deaf3d..04079767d6d2146e6db76181d8bbc4cacb5e19ea 100644 (file)
@@ -104,7 +104,8 @@ int smb_thread_set_functions(const struct smb_thread_functions *tf)
  size variable in code internal to Samba without knowing the
  implementation's "once" type.
 ********************************************************************/
-void smb_thread_once(smb_thread_once_t *ponce, void (*init_fn)(void))
+
+int smb_thread_once(smb_thread_once_t *ponce, void (*init_fn)(void))
 {
         int ret;
         bool need_func_call;
@@ -142,6 +143,8 @@ void smb_thread_once(smb_thread_once_t *ponce, void (*init_fn)(void))
                 /* ... then do so now. */
                 (*init_fn)();
         }
+
+       return 0;
 }
 
 
index 012b61c1ed3c6cec110f3986326e72edfafbb221..5079b17c6d2c0c879a111ee3c27cf35f2f9869c4 100644 (file)
@@ -52,7 +52,7 @@ struct smb_thread_functions {
 };
 
 int smb_thread_set_functions(const struct smb_thread_functions *tf);
-void smb_thread_once(smb_thread_once_t *ponce, void (*init_fn)(void));
+int smb_thread_once(smb_thread_once_t *ponce, void (*init_fn)(void));
 
 extern const struct smb_thread_functions *global_tfp;