From: Christian Göttsche Date: Mon, 7 Aug 2023 17:11:41 +0000 (+0200) Subject: selinux: use unsigned iterator in nlmsgtab code X-Git-Tag: v6.6-rc1~148^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e49be9bc7c1bd1125933f42a157ca9a2812e3797;p=thirdparty%2Fkernel%2Flinux.git selinux: use unsigned iterator in nlmsgtab code Use an unsigned type as loop iterator. Signed-off-by: Christian Göttsche Signed-off-by: Paul Moore --- diff --git a/security/selinux/nlmsgtab.c b/security/selinux/nlmsgtab.c index 2ee7b4ed43ef8..8ff670cf1ee59 100644 --- a/security/selinux/nlmsgtab.c +++ b/security/selinux/nlmsgtab.c @@ -153,7 +153,8 @@ static const struct nlmsg_perm nlmsg_audit_perms[] = { static int nlmsg_perm(u16 nlmsg_type, u32 *perm, const struct nlmsg_perm *tab, size_t tabsize) { - int i, err = -EINVAL; + unsigned int i; + int err = -EINVAL; for (i = 0; i < tabsize/sizeof(struct nlmsg_perm); i++) if (nlmsg_type == tab[i].nlmsg_type) {