From: Evan Hunt Date: Sun, 6 Mar 2016 03:50:42 +0000 (-0800) Subject: [master] silence coverity warning X-Git-Tag: v9.11.0a1~72 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=868b3166b83ffd90b8c37fbd26aa7feccc5b46ef;p=thirdparty%2Fbind9.git [master] silence coverity warning --- diff --git a/lib/isc/httpd.c b/lib/isc/httpd.c index de6b380e973..fbf9a063ee3 100644 --- a/lib/isc/httpd.c +++ b/lib/isc/httpd.c @@ -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; }