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

index de6b380e97387c3d8535071f59e702155212922f..fbf9a063ee3b8f9367c02cc2f82deb262dea1ffc 100644 (file)
@@ -401,12 +401,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;
                }