Skip to content

Commit e49be9b

Browse files
cgzonespcmoore
authored andcommitted
selinux: use unsigned iterator in nlmsgtab code
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>
1 parent dee1537 commit e49be9b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

security/selinux/nlmsgtab.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ static const struct nlmsg_perm nlmsg_audit_perms[] = {
153153

154154
static int nlmsg_perm(u16 nlmsg_type, u32 *perm, const struct nlmsg_perm *tab, size_t tabsize)
155155
{
156-
int i, err = -EINVAL;
156+
unsigned int i;
157+
int err = -EINVAL;
157158

158159
for (i = 0; i < tabsize/sizeof(struct nlmsg_perm); i++)
159160
if (nlmsg_type == tab[i].nlmsg_type) {

0 commit comments

Comments
 (0)