net: inet_is_local_reserved_port() should return bool not int
diff mbox series

Message ID 20191122215052.155595-1-zenczykowski@gmail.com
State Accepted
Delegated to: David Miller
Headers show
Series
  • net: inet_is_local_reserved_port() should return bool not int
Related show

Commit Message

Maciej Żenczykowski Nov. 22, 2019, 9:50 p.m. UTC
From: Maciej Żenczykowski <maze@google.com>

Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
---
 include/net/ip.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Comments

Jakub Kicinski Nov. 23, 2019, 12:55 a.m. UTC | #1
On Fri, 22 Nov 2019 13:50:52 -0800, Maciej Żenczykowski wrote:
> From: Maciej Żenczykowski <maze@google.com>
> 
> Cc: Eric Dumazet <edumazet@google.com>
> Signed-off-by: Maciej Żenczykowski <maze@google.com>

Applied.

It would had been nice to see net-next in the subject and a commit
message, you know :/
Maciej Żenczykowski Nov. 23, 2019, 3:31 a.m. UTC | #2
> On Fri, 22 Nov 2019 13:50:52 -0800, Maciej Żenczykowski wrote:
> > From: Maciej Żenczykowski <maze@google.com>
> >
> > Cc: Eric Dumazet <edumazet@google.com>
> > Signed-off-by: Maciej Żenczykowski <maze@google.com>
>
> Applied.
>
> It would had been nice to see net-next in the subject and a commit
> message, you know :/

Sorry, about that.  I'm never entirely certain what's going to
net-next, what isn't.
Should I just default to net-next?

As for the commit message, there simply didn't appear to be anything to write,
the commit title was pretty self explanatory I thought.

- Maciej

Patch
diff mbox series

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)