url: make Curl_init_userdefined return void

It cannot actually return an error, so the parent function does not need
to check for error and have an exit path that cannot be reached.

Pointed out by CodeSonar

Closes #18855
This commit is contained in:
Daniel Stenberg 2025-10-05 14:07:39 +02:00
parent 1ae5e44eff
commit b54b4697ca
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
4 changed files with 6 additions and 24 deletions

View file

@ -97,9 +97,6 @@ static CURLcode test_unit1620(const char *arg)
fail_unless(rc == CURLE_URL_MALFORMAT,
"Curl_connect() failed to return CURLE_URL_MALFORMAT");
rc = Curl_init_userdefined(empty);
fail_unless(rc == CURLE_OK, "Curl_userdefined() failed");
rc = Curl_init_do(empty, empty->conn);
fail_unless(rc == CURLE_OK, "Curl_init_do() failed");