summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-08-23 00:34:16 +0200
committerDaniel Stenberg <daniel@haxx.se>2021-08-23 00:34:16 +0200
commitd2d59571076ee042345b4302ecdae99d71620ea0 (patch)
treeb96952b213b5c73c2790570c73a472ffd7381bb1
parentf09030b63867895cccffbd3d61ef6d3dd86c4307 (diff)
downloadcurl-bagder/urlapi-assert-url.tar.gz
urlapi.c:seturl: assert URL instead of using if-checkbagder/urlapi-assert-url
There's no code flow possible where this can happen. The assert makes sure it also won't be introduced undetected in the future.
-rw-r--r--lib/urlapi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/urlapi.c b/lib/urlapi.c
index 905c499d9..7f03862cf 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.