[Pound Mailing List] [PATCH] Do not return NULL data from get_thr_arg

Lubomir Rintel <lubo.rintel-Vz9dX3IBr95Wk0Htik3J/[email protected]>
Newsgroups gmane.comp.web.pound.general
Message-ID <[email protected]>
From: Miroslav Spousta <miroslav.spousta-Vz9dX3IBr95Wk0Htik3J/[email protected]>

get_thr_arg() always waits for non-NULL argument. It prevents "NULL
get_thr_arg" log message.
---
 pound.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pound.c b/pound.c
index 3643f70..42a869d 100644
--- a/pound.c
+++ b/pound.c
@@ -156,7 +156,7 @@ get_thr_arg(void)
     thr_arg *res;
 
     (void)pthread_mutex_lock(&arg_mut);
-    if(first == NULL)
+    while(first == NULL)
         (void)pthread_cond_wait(&arg_cond, &arg_mut);
     if((res = first) != NULL)
         if((first = first->next) == NULL)
-- 
1.8.3.1


--
To unsubscribe send an email with subject unsubscribe to [email protected]
Please contact [email protected] for questions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.