From: Jeremy Allison Date: Tue, 12 May 2009 05:33:32 +0000 (-0700) Subject: Fix definition of smb_thread_once - must return int not void as X-Git-Tag: tdb-1.1.5~615 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6bc1ce996d67c5f0d2c2d8571cbaabaf51e26d8d;p=thirdparty%2Fsamba.git Fix definition of smb_thread_once - must return int not void as it's used in a ? : comparison macro. Jeremy. --- diff --git a/lib/util/smb_threads.c b/lib/util/smb_threads.c index 22afcd378f2..04079767d6d 100644 --- a/lib/util/smb_threads.c +++ b/lib/util/smb_threads.c @@ -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; } diff --git a/lib/util/smb_threads.h b/lib/util/smb_threads.h index 012b61c1ed3..5079b17c6d2 100644 --- a/lib/util/smb_threads.h +++ b/lib/util/smb_threads.h @@ -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;