From a5d35f85f20ae416c0d29f153e47ca7962d08c95 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 31 Jan 2007 14:40:01 +0100 Subject: [PATCH] unixsock plugin: Fix the initialization of the pthread variable under Mac OS X. --- src/unixsock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/unixsock.c b/src/unixsock.c index de1fa4fd..f6dbf730 100644 --- a/src/unixsock.c +++ b/src/unixsock.c @@ -74,7 +74,7 @@ static char *sock_file = NULL; static char *sock_group = NULL; static int sock_perms = S_IRWXU | S_IRWXG; -static pthread_t listen_thread = -1; +static pthread_t listen_thread = NULL; /* Linked list and auxilliary variables for saving values */ static value_cache_t *cache_head = NULL; @@ -654,7 +654,7 @@ static int us_shutdown (void) { void *ret; - if (listen_thread >= 0) + if (listen_thread != NULL) { pthread_kill (listen_thread, SIGTERM); pthread_join (listen_thread, &ret); -- 2.30.2