diff options
author | Paul Moore <paul@paul-moore.com> | 2020-03-05 20:55:43 +0100 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-03-05 20:55:43 +0100 |
commit | 5e729e111eaf37b7941c678cb84af62539a4799a (patch) | |
tree | 560da6da64809b755af8b5e5a320d482b3ab26be /security/selinux/ss/policydb.c | |
parent | selinux: clean up error path in policydb_init() (diff) | |
download | linux-5e729e111eaf37b7941c678cb84af62539a4799a.tar.xz linux-5e729e111eaf37b7941c678cb84af62539a4799a.zip |
selinux: avtab_init() and cond_policydb_init() return void
The avtab_init() and cond_policydb_init() functions always return
zero so mark them as returning void and update the callers not to
check for a return value.
Suggested-by: Stephen Smalley <stephen.smalley.work@gmail.com>
Reviewed-by: Ondrej Mosnacek <omosnace@redhat.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/policydb.c')
-rw-r--r-- | security/selinux/ss/policydb.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c index 00edcd216aaa..932b2b9bcdb2 100644 --- a/security/selinux/ss/policydb.c +++ b/security/selinux/ss/policydb.c @@ -463,17 +463,10 @@ static int rangetr_cmp(struct hashtab *h, const void *k1, const void *k2) */ static int policydb_init(struct policydb *p) { - int rc; - memset(p, 0, sizeof(*p)); - rc = avtab_init(&p->te_avtab); - if (rc) - return rc; - - rc = cond_policydb_init(p); - if (rc) - return rc; + avtab_init(&p->te_avtab); + cond_policydb_init(p); p->filename_trans = hashtab_create(filenametr_hash, filenametr_cmp, (1 << 11)); |