summaryrefslogtreecommitdiff
path: root/lib/urldata.h
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2021-01-26 11:04:33 +0100
committerDaniel Stenberg <daniel@haxx.se>2021-01-27 09:19:01 +0100
commit764c6bd3bf2e7a1f8bc33162ab77b667770f4f73 (patch)
tree01321aab74a16bd212e36675ec0e1af556008a30 /lib/urldata.h
parent642d78026f409cfb5b31affc271a0eb8298e8020 (diff)
downloadcurl-764c6bd3bf2e7a1f8bc33162ab77b667770f4f73.tar.gz
urldata: remove duplicate port number storage
... and use 'int' for ports. We don't use 'unsigned short' since -1 is still often used internally to signify "unknown value" and 0 - 65535 are all valid port numbers. Closes #6534
Diffstat (limited to 'lib/urldata.h')
-rw-r--r--lib/urldata.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/urldata.h b/lib/urldata.h
index 3ab06feea..1e186d22d 100644
--- a/lib/urldata.h
+++ b/lib/urldata.h
@@ -782,7 +782,7 @@ struct Curl_handler {
struct connectdata *conn,
unsigned int checks_to_perform);
- long defport; /* Default port. */
+ int defport; /* Default port. */
unsigned int protocol; /* See CURLPROTO_* - this needs to be the single
specific protocol bit */
unsigned int family; /* single bit for protocol family; basically the
@@ -961,7 +961,7 @@ struct connectdata {
struct proxy_info socks_proxy;
struct proxy_info http_proxy;
#endif
- long port; /* which port to use locally */
+ int port; /* which port to use locally - to connect to */
int remote_port; /* the remote port, not the proxy port! */
int conn_to_port; /* the remote port to connect to. valid only if
bits.conn_to_port is set */
@@ -976,7 +976,6 @@ struct connectdata {
these are updated with data which comes directly from the socket. */
char primary_ip[MAX_IPADR_LEN];
- long primary_port;
/* 'local_ip' and 'local_port' get filled with local's numerical
ip address and port number whenever an outgoing connection is