]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
url: (void)-prefix a curl_url_get() call
authorDaniel Stenberg <daniel@haxx.se>
Wed, 30 Jun 2021 09:17:57 +0000 (11:17 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 30 Jun 2021 12:58:47 +0000 (14:58 +0200)
Coverity (CID 1486645) pointed out a use of curl_url_get() in the
parse_proxy function where the return code wasn't checked. A
(void)-prefix makes the intention obvious.

Closes #7320

lib/url.c

index 764f1445ad3921888bd54d07313a89961aeed698..a8208d749e4845e1efea778fbe78914a40cc189e 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -2464,7 +2464,7 @@ static CURLcode parse_proxy(struct Curl_easy *data,
     conn->bits.proxy_user_passwd = TRUE; /* enable it */
   }
 
-  curl_url_get(uhp, CURLUPART_PORT, &portptr, 0);
+  (void)curl_url_get(uhp, CURLUPART_PORT, &portptr, 0);
 
   if(portptr) {
     port = (int)strtol(portptr, NULL, 10);