From: Daniel Stenberg Date: Thu, 13 Apr 2023 07:23:01 +0000 (+0200) Subject: urlapi: skip a pointless assign X-Git-Tag: curl-8_1_0~160 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3f1d89ed242cec808d80fc2d0eef45a77c295a5d;p=thirdparty%2Fcurl.git urlapi: skip a pointless assign It stores a null byte after already having confirmed there is a null byte there. Detected by PVS. Ref: #10929 Closes #10943 --- diff --git a/lib/urlapi.c b/lib/urlapi.c index e45d056bca..15e31ec6d1 100644 --- a/lib/urlapi.c +++ b/lib/urlapi.c @@ -541,7 +541,6 @@ UNITTEST CURLUcode Curl_parse_port(struct Curl_URL *u, struct dynbuf *host, if(rest[0]) return CURLUE_BAD_PORT_NUMBER; - *rest = 0; u->portnum = port; /* generate a new port number string to get rid of leading zeroes etc */ u->port = aprintf("%ld", port);