]> granicus.if.org Git - check/commitdiff
The mutex cleanup function is now declared as static
authorbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Mon, 23 Sep 2013 17:58:02 +0000 (17:58 +0000)
committerbrarcher <brarcher@64e312b2-a51f-0410-8e61-82d0ca0eb02a>
Mon, 23 Sep 2013 17:58:02 +0000 (17:58 +0000)
ppack_cleanup should not be called outside of check_pack.c,
as it is passed as a cleanup callback to pthread. Declaring it
as static.

git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@788 64e312b2-a51f-0410-8e61-82d0ca0eb02a

src/check_pack.c
src/check_pack.h

index 50f6a9cb2dfc6d2e4491327300feccffd3c56e33..6bed73549d0eab858678d11ae34ab864aa630a26 100644 (file)
@@ -284,7 +284,7 @@ static void check_type (int type, const char *file, int line)
 
 #ifdef HAVE_PTHREAD
 static pthread_mutex_t ck_mutex_lock = PTHREAD_MUTEX_INITIALIZER;
-void ppack_cleanup( void *mutex )
+static void ppack_cleanup( void *mutex )
 {
   pthread_mutex_unlock(mutex);
 }
index 8215ddb4bc89b33f94218cdf911c76abf03b8715..f7be4aa3f89682ad434594eaa2f5ba8530d8b4ae 100644 (file)
@@ -79,9 +79,4 @@ int upack (char *buf, CheckMsg *msg, enum ck_msg_type *type);
 void ppack (int fdes, enum ck_msg_type type, CheckMsg *msg);
 RcvMsg *punpack (int fdes);
 
-#ifdef HAVE_PTHREAD
-void ppack_cleanup( void *mutex );
-#endif
-
-
 #endif /*CHECK_PACK_H */