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
This commit is contained in:
Daniel Stenberg 2021-08-23 00:34:16 +02:00
parent f09030b638
commit 98e6db24c4
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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.