Skip to content

Commit

Permalink
net: inet_is_local_reserved_port() should return bool not int
Browse files Browse the repository at this point in the history
Cc: Eric Dumazet <[email protected]>
Signed-off-by: Maciej Żenczykowski <[email protected]>
Signed-off-by: Jakub Kicinski <[email protected]>
  • Loading branch information
zenczykowski authored and Jakub Kicinski committed Nov 23, 2019
1 parent 091189a commit 30429fb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions include/net/ip.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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)
Expand Down

0 comments on commit 30429fb

Please sign in to comment.