diff options
author | Daniel Stenberg <daniel@haxx.se> | 2021-08-23 00:34:16 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2021-08-23 08:50:58 +0200 |
commit | 98e6db24c44e2bd05cb591658c7c46af6cc0c9d5 (patch) | |
tree | b96952b213b5c73c2790570c73a472ffd7381bb1 /lib | |
parent | f09030b63867895cccffbd3d61ef6d3dd86c4307 (diff) | |
download | curl-98e6db24c44e2bd05cb591658c7c46af6cc0c9d5.tar.gz |
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.
Closes #7610
Diffstat (limited to 'lib')
-rw-r--r-- | lib/urlapi.c | 3 |
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. |