mirror of
https://github.com/curl/curl.git
synced 2026-07-29 06:33:07 +03:00
lib: use %u instead of %ld for port number printf
Follow-up to 764c6bd3bf which changed the type of some port number
fields. Detected by Coverity (CID 1486624) etc.
Closes #7325
This commit is contained in:
parent
63c7668182
commit
d696ee00ee
3 changed files with 4 additions and 4 deletions
|
|
@ -1155,7 +1155,7 @@ CURLUcode curl_url_get(CURLU *u, CURLUPart what,
|
|||
const struct Curl_handler *h =
|
||||
Curl_builtin_scheme(u->scheme);
|
||||
if(h) {
|
||||
msnprintf(portbuf, sizeof(portbuf), "%ld", h->defport);
|
||||
msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
|
||||
ptr = portbuf;
|
||||
}
|
||||
}
|
||||
|
|
@ -1214,7 +1214,7 @@ CURLUcode curl_url_get(CURLU *u, CURLUPart what,
|
|||
/* there's no stored port number, but asked to deliver
|
||||
a default one for the scheme */
|
||||
if(h) {
|
||||
msnprintf(portbuf, sizeof(portbuf), "%ld", h->defport);
|
||||
msnprintf(portbuf, sizeof(portbuf), "%u", h->defport);
|
||||
port = portbuf;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue