fixup try two asserts and see if tidy gets happier

This commit is contained in:
Daniel Stenberg 2025-02-26 15:14:01 +01:00
parent 293074f8c1
commit e398c036ec
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -248,6 +248,7 @@ static CURLUcode redirect_url(const char *base, const char *relurl,
/* protsep points to the start of the hostname, after [scheme]:// */
const char *protsep = base + strlen(u->scheme) + 3;
DEBUGASSERT(base); /* it is set here */
/* handle different relative URL types */
switch(relurl[0]) {
@ -1770,7 +1771,7 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
|| curl_url_get(u, CURLUPART_URL, &oldurl, flags)) {
return parseurl_and_replace(part, u, flags);
}
DEBUGASSERT(oldurl); /* it is set here */
/* apply the relative part to create a new URL */
uc = redirect_url(oldurl, part, u, flags);
free(oldurl);