From 53bcdbd5e31c535b03e5572535ce1d270ac269d3 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Sat, 5 Mar 2016 19:50:51 -0800 Subject: [PATCH] [v9_10] 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 8cf57be21c..7c7aea2b6f 100644 --- a/lib/isc/httpd.c +++ b/lib/isc/httpd.c @@ -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; }