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
This commit is contained in:
Daniel Stenberg 2023-04-13 09:23:01 +02:00
parent 8203aa6ed4
commit 3f1d89ed24
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -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);