]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
[v9_9] silence coverity warning
authorEvan Hunt <each@isc.org>
Sun, 6 Mar 2016 03:50:57 +0000 (19:50 -0800)
committerEvan Hunt <each@isc.org>
Sun, 6 Mar 2016 03:50:57 +0000 (19:50 -0800)
lib/isc/httpd.c

index de6e747a3dd57003ef3125e17f5675ce64c9b2d3..260ab198a197138495962b7e7a9a6940700aeebb 100644 (file)
@@ -387,12 +387,13 @@ have_header(isc_httpd_t *httpd, const char *header, const char *value,
                        if (cr != NULL && cr[1] == '\n')
                                cr++;
                        nl = strchr(h, '\n');
+
                        /* last header? */
-                       if (cr == NULL && nl == NULL)
-                               return(ISC_FALSE);
                        h = cr;
-                       if (h == NULL || nl < h)
+                       if (h == NULL || (nl != NULL && nl < h))
                                h = nl;
+                       if (h == NULL)
+                               return (ISC_FALSE);
                        h++;
                        continue;
                }