Skip to content

Commit 30429fb

Browse files
zenczykowskiJakub Kicinski
authored andcommitted
net: inet_is_local_reserved_port() should return bool not int
Cc: Eric Dumazet <[email protected]> Signed-off-by: Maciej Żenczykowski <[email protected]> Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 091189a commit 30429fb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

include/net/ip.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -339,10 +339,10 @@ static inline u64 snmp_fold_field64(void __percpu *mib, int offt, size_t syncp_o
339339
void inet_get_local_port_range(struct net *net, int *low, int *high);
340340

341341
#ifdef CONFIG_SYSCTL
342-
static inline int inet_is_local_reserved_port(struct net *net, int port)
342+
static inline bool inet_is_local_reserved_port(struct net *net, int port)
343343
{
344344
if (!net->ipv4.sysctl_local_reserved_ports)
345-
return 0;
345+
return false;
346346
return test_bit(port, net->ipv4.sysctl_local_reserved_ports);
347347
}
348348

@@ -357,9 +357,9 @@ static inline int inet_prot_sock(struct net *net)
357357
}
358358

359359
#else
360-
static inline int inet_is_local_reserved_port(struct net *net, int port)
360+
static inline bool inet_is_local_reserved_port(struct net *net, int port)
361361
{
362-
return 0;
362+
return false;
363363
}
364364

365365
static inline int inet_prot_sock(struct net *net)

0 commit comments

Comments
 (0)