From: kokke Date: Fri, 5 Mar 2021 21:18:31 +0000 (+0100) Subject: c-hyper: Remove superfluous pointer check X-Git-Tag: curl-7_76_0~98 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=86338ca69837661b1608d95bde0bd0e427a2e0b7;p=thirdparty%2Fcurl.git c-hyper: Remove superfluous pointer check `n` pointer is never NULL once set. Found by static analysis. Ref: https://github.com/curl/curl/issues/6696 Closes https://github.com/curl/curl/pull/6697 --- diff --git a/lib/c-hyper.c b/lib/c-hyper.c index 8b4abd37f8..c3a16cf82f 100644 --- a/lib/c-hyper.c +++ b/lib/c-hyper.c @@ -464,8 +464,6 @@ CURLcode Curl_hyper_header(struct Curl_easy *data, hyper_headers *headers, else linelen = 2; /* CRLF ending */ linelen += (p - n); - if(!n) - return CURLE_BAD_FUNCTION_ARGUMENT; vlen = p - v; if(HYPERE_OK != hyper_headers_add(headers, (uint8_t *)n, nlen,