From d2d59571076ee042345b4302ecdae99d71620ea0 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 23 Aug 2021 00:34:16 +0200 Subject: [PATCH] urlapi.c:seturl: assert URL instead of using if-check There's no code flow possible where this can happen. The assert makes sure it also won't be introduced undetected in the future. --- lib/urlapi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/urlapi.c b/lib/urlapi.c index 905c499d995829..7f03862cfa2192 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -770,8 +770,7 @@ static CURLUcode seturl(const char *url, CURLU *u, unsigned int flags) size_t schemelen = 0; size_t urllen; - if(!url) - return CURLUE_MALFORMED_INPUT; + DEBUGASSERT(url); /************************************************************* * Parse the URL.