[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230706132337.15924-10-cgzones@googlemail.com>
Date: Thu, 6 Jul 2023 15:23:25 +0200
From: Christian Göttsche <cgzones@...glemail.com>
To: selinux@...r.kernel.org
Cc: Paul Moore <paul@...l-moore.com>,
Stephen Smalley <stephen.smalley.work@...il.com>,
Eric Paris <eparis@...isplace.org>,
linux-kernel@...r.kernel.org
Subject: [RFC PATCH 10/20] selinux: netif: avoid implicit conversions
Use the identical type sel_netif_hashfn() returns.
Signed-off-by: Christian Göttsche <cgzones@...glemail.com>
---
security/selinux/netif.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/selinux/netif.c b/security/selinux/netif.c
index adbe9bea2d26..43a0d3594b72 100644
--- a/security/selinux/netif.c
+++ b/security/selinux/netif.c
@@ -67,7 +67,7 @@ static inline u32 sel_netif_hashfn(const struct net *ns, int ifindex)
static inline struct sel_netif *sel_netif_find(const struct net *ns,
int ifindex)
{
- int idx = sel_netif_hashfn(ns, ifindex);
+ u32 idx = sel_netif_hashfn(ns, ifindex);
struct sel_netif *netif;
list_for_each_entry_rcu(netif, &sel_netif_hash[idx], list)
@@ -89,7 +89,7 @@ static inline struct sel_netif *sel_netif_find(const struct net *ns,
*/
static int sel_netif_insert(struct sel_netif *netif)
{
- int idx;
+ u32 idx;
if (sel_netif_total >= SEL_NETIF_HASH_MAX)
return -ENOSPC;
--
2.40.1
Powered by blists - more mailing lists