From 868b3166b83ffd90b8c37fbd26aa7feccc5b46ef Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Sat, 5 Mar 2016 19:50:42 -0800 Subject: [PATCH] [master] silence coverity warning --- lib/isc/httpd.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/isc/httpd.c b/lib/isc/httpd.c index de6b380e97..fbf9a063ee 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; }