From a69434084ac5a4575e86dc441357dcd582f6d5fd Mon Sep 17 00:00:00 2001 From: brarcher Date: Mon, 23 Sep 2013 17:58:02 +0000 Subject: [PATCH] The mutex cleanup function is now declared as static 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 | 2 +- src/check_pack.h | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/check_pack.c b/src/check_pack.c index 50f6a9c..6bed735 100644 --- a/src/check_pack.c +++ b/src/check_pack.c @@ -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); } diff --git a/src/check_pack.h b/src/check_pack.h index 8215ddb..f7be4aa 100644 --- a/src/check_pack.h +++ b/src/check_pack.h @@ -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 */ -- 2.40.0