Commit 30429fba authored by Maciej Żenczykowski's avatar Maciej Żenczykowski Committed by Jakub Kicinski

net: inet_is_local_reserved_port() should return bool not int

Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: default avatarMaciej Żenczykowski <maze@google.com>
Signed-off-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
parent 091189ab
...@@ -339,10 +339,10 @@ static inline u64 snmp_fold_field64(void __percpu *mib, int offt, size_t syncp_o ...@@ -339,10 +339,10 @@ static inline u64 snmp_fold_field64(void __percpu *mib, int offt, size_t syncp_o
void inet_get_local_port_range(struct net *net, int *low, int *high); void inet_get_local_port_range(struct net *net, int *low, int *high);
#ifdef CONFIG_SYSCTL #ifdef CONFIG_SYSCTL
static inline int inet_is_local_reserved_port(struct net *net, int port) static inline bool inet_is_local_reserved_port(struct net *net, int port)
{ {
if (!net->ipv4.sysctl_local_reserved_ports) if (!net->ipv4.sysctl_local_reserved_ports)
return 0; return false;
return test_bit(port, net->ipv4.sysctl_local_reserved_ports); return test_bit(port, net->ipv4.sysctl_local_reserved_ports);
} }
...@@ -357,9 +357,9 @@ static inline int inet_prot_sock(struct net *net) ...@@ -357,9 +357,9 @@ static inline int inet_prot_sock(struct net *net)
} }
#else #else
static inline int inet_is_local_reserved_port(struct net *net, int port) static inline bool inet_is_local_reserved_port(struct net *net, int port)
{ {
return 0; return false;
} }
static inline int inet_prot_sock(struct net *net) static inline int inet_prot_sock(struct net *net)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment