OSDN Git Service

selinux: fix implicit conversions in the symtab
authorChristian Göttsche <cgzones@googlemail.com>
Thu, 6 Jul 2023 13:23:31 +0000 (15:23 +0200)
committerPaul Moore <paul@paul-moore.com>
Tue, 18 Jul 2023 22:29:49 +0000 (18:29 -0400)
hashtab_init() takes an u32 as size parameter type.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
[PM: subject line tweaks]
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/ss/symtab.c
security/selinux/ss/symtab.h

index c42a664..7a77571 100644 (file)
@@ -37,7 +37,7 @@ static const struct hashtab_key_params symtab_key_params = {
        .cmp = symcmp,
 };
 
-int symtab_init(struct symtab *s, unsigned int size)
+int symtab_init(struct symtab *s, u32 size)
 {
        s->nprim = 0;
        return hashtab_init(&s->table, size);
index f261413..3033c4d 100644 (file)
@@ -17,7 +17,7 @@ struct symtab {
        u32 nprim;              /* number of primary names in table */
 };
 
-int symtab_init(struct symtab *s, unsigned int size);
+int symtab_init(struct symtab *s, u32 size);
 
 int symtab_insert(struct symtab *s, char *name, void *datum);
 void *symtab_search(struct symtab *s, const char *name);