From 86338ca69837661b1608d95bde0bd0e427a2e0b7 Mon Sep 17 00:00:00 2001 From: kokke Date: Fri, 5 Mar 2021 22:18:31 +0100 Subject: [PATCH] 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 --- lib/c-hyper.c | 2 -- 1 file changed, 2 deletions(-) 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,