]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
selinux: use unsigned iterator in nlmsgtab code
authorChristian Göttsche <cgzones@googlemail.com>
Mon, 7 Aug 2023 17:11:41 +0000 (19:11 +0200)
committerPaul Moore <paul@paul-moore.com>
Wed, 9 Aug 2023 23:07:49 +0000 (19:07 -0400)
Use an unsigned type as loop iterator.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/nlmsgtab.c

index 2ee7b4ed43ef818c1898aa36621476ce448db795..8ff670cf1ee59948168df750b941f1cc6918ad5c 100644 (file)
@@ -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) {