aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaciej Żenczykowski <maze@google.com>2019-11-22 13:50:52 -0800
committerJakub Kicinski <jakub.kicinski@netronome.com>2019-11-22 16:52:47 -0800
commit30429fba99b51836ea8a11174be95ddaa8c47703 (patch)
tree36860a9260bdf582a3333af161612b8d41564818
parentMerge branch 'cxgb4-add-udp-segmentation-offload-support' (diff)
downloadlinux-dev-30429fba99b51836ea8a11174be95ddaa8c47703.tar.xz
linux-dev-30429fba99b51836ea8a11174be95ddaa8c47703.zip
net: inet_is_local_reserved_port() should return bool not int
Cc: Eric Dumazet <edumazet@google.com> Signed-off-by: Maciej Żenczykowski <maze@google.com> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
-rw-r--r--include/net/ip.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/net/ip.h b/include/net/ip.h
index a2c61c36dc4a..cebf3e10def1 100644
--- a/include/net/ip.h
+++ b/include/net/ip.h
@@ -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);
#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)
- return 0;
+ return false;
return test_bit(port, net->ipv4.sysctl_local_reserved_ports);
}
@@ -357,9 +357,9 @@ static inline int inet_prot_sock(struct net *net)
}
#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)