From: Fabian Keil <fk@fabiankeil.de>
Date: Sat, 18 Oct 2014 11:24:53 +0000 (+0000)
Subject: accept_connection(): Adjust loop condition to silence a ressource leak warning
X-Git-Tag: v_3_0_22~62
X-Git-Url: http://www.privoxy.org/gitweb/@default-cgi@edit-actions-url-form?a=commitdiff_plain;h=8e025f46200aef5c4f6961b5aca59695d4ce6084;p=privoxy.git

accept_connection(): Adjust loop condition to silence a ressource leak warning

This is a nop because fd 0 is guaranteed to be in use and
thus can't be returned by accept() anyway.

CID 66393.
---

diff --git a/jbsockets.c b/jbsockets.c
index 96f22946..13a6a0c2 100644
--- a/jbsockets.c
+++ b/jbsockets.c
@@ -1,4 +1,4 @@
-const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.126 2014/06/02 06:22:20 fabiankeil Exp $";
+const char jbsockets_rcs[] = "$Id: jbsockets.c,v 1.127 2014/06/03 10:27:56 fabiankeil Exp $";
 /*********************************************************************
  *
  * File        :  $Source: /cvsroot/ijbswa/current/jbsockets.c,v $
@@ -1276,7 +1276,7 @@ int accept_connection(struct client_state * csp, jb_socket fds[])
       setsockopt(fd, SOL_SOCKET, SO_ACCEPTFILTER, &af_options, sizeof(af_options));
 #endif
       afd = accept (fd, (struct sockaddr *) &client, &c_length);
-   } while (afd < 1 && errno == EINTR);
+   } while (afd < 0 && errno == EINTR);
    if (afd < 0)
    {
       return 0;