lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150429192252.24909.49543.stgit@warthog.procyon.org.uk>
Date:	Wed, 29 Apr 2015 20:22:52 +0100
From:	David Howells <dhowells@...hat.com>
To:	linux-arch@...r.kernel.org
Cc:	dhowells@...hat.com, linux-kernel@...r.kernel.org
Subject: [PATCH 13/13] Make xfrm functions that return a boolean value
 return bool

Make xfrm functions that return a boolean value return bool to allow gcc to
make better decisions.

Signed-off-by: David Howells <dhowells@...hat.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);

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ