lkml.org 
[lkml]   [2015]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 13/13] Make xfrm functions that return a boolean value return bool
From
Date
Make xfrm functions that return a boolean value return bool to allow gcc to
make better decisions.

Signed-off-by: David Howells <dhowells@redhat.com>
---

include/net/xfrm.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/net/xfrm.h b/include/net/xfrm.h
index 36ac102c97c7..8b2d3683d4e1 100644
--- a/include/net/xfrm.h
+++ b/include/net/xfrm.h
@@ -1658,10 +1658,10 @@ static inline int xfrm_policy_id2dir(u32 index)
}

#ifdef CONFIG_XFRM
-static inline int xfrm_aevent_is_on(struct net *net)
+static inline bool xfrm_aevent_is_on(struct net *net)
{
struct sock *nlsk;
- int ret = 0;
+ bool ret = false;

rcu_read_lock();
nlsk = rcu_dereference(net->xfrm.nlsk);
@@ -1671,10 +1671,10 @@ static inline int xfrm_aevent_is_on(struct net *net)
return ret;
}

-static inline int xfrm_acquire_is_on(struct net *net)
+static inline bool xfrm_acquire_is_on(struct net *net)
{
struct sock *nlsk;
- int ret = 0;
+ int ret = false;

rcu_read_lock();
nlsk = rcu_dereference(net->xfrm.nlsk);


\
 
 \ /
  Last update: 2015-04-29 21:41    [W:0.158 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site