mirror of
https://github.com/haproxy/haproxy.git
synced 2026-05-28 04:12:17 -04:00
CLEANUP: tools: Use const address for get_net_port() and get_host_port()
These functions only extract the port from an address. There is no reason to not use a const address.
This commit is contained in:
parent
4bfce397b8
commit
99163b75ec
1 changed files with 2 additions and 2 deletions
|
|
@ -673,7 +673,7 @@ static inline int is_addr(const struct sockaddr_storage *addr)
|
|||
}
|
||||
|
||||
/* returns port in network byte order */
|
||||
static inline int get_net_port(struct sockaddr_storage *addr)
|
||||
static inline int get_net_port(const struct sockaddr_storage *addr)
|
||||
{
|
||||
switch (addr->ss_family) {
|
||||
case AF_INET:
|
||||
|
|
@ -685,7 +685,7 @@ static inline int get_net_port(struct sockaddr_storage *addr)
|
|||
}
|
||||
|
||||
/* returns port in host byte order */
|
||||
static inline int get_host_port(struct sockaddr_storage *addr)
|
||||
static inline int get_host_port(const struct sockaddr_storage *addr)
|
||||
{
|
||||
switch (addr->ss_family) {
|
||||
case AF_INET:
|
||||
|
|
|
|||
Loading…
Reference in a new issue