diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2023-07-06 16:23:25 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2023-07-19 01:29:48 +0300 |
commit | 777ea29c57a078679fdb637919c1794d0d244128 (patch) | |
tree | c13d11037cf4da40f166a87bf578885130dcb067 /security/selinux/netif.c | |
parent | 1f270f1c34127e5a65ba5aaf574f313f0693fcfa (diff) | |
download | linux-777ea29c57a078679fdb637919c1794d0d244128.tar.xz |
selinux: avoid implicit conversions in the netif code
Use the identical type sel_netif_hashfn() returns.
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
[PM: subject line tweaks]
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/netif.c')
-rw-r--r-- | security/selinux/netif.c | 4 |
1 files 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; |