diff options
author | Ondrej Mosnacek <omosnace@redhat.com> | 2020-01-17 11:58:32 +0300 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-02-10 18:49:01 +0300 |
commit | 06c2efe2cf3aa70abbdf97e88641abca2e707a15 (patch) | |
tree | 172985d880e3cb1cd355bc1149e3467c53b645fe /security/selinux/ss/services.c | |
parent | e9c38f9fc2ccd31befe1bb1605b69213483a15b7 (diff) | |
download | linux-06c2efe2cf3aa70abbdf97e88641abca2e707a15.tar.xz |
selinux: simplify evaluate_cond_node()
It never fails, so it can just return void.
Signed-off-by: Ondrej Mosnacek <omosnace@redhat.com>
Reviewed-by: Stephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/services.c')
-rw-r--r-- | security/selinux/ss/services.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/security/selinux/ss/services.c b/security/selinux/ss/services.c index 5cf491768142..922b5e4a03e8 100644 --- a/security/selinux/ss/services.c +++ b/security/selinux/ss/services.c @@ -2956,11 +2956,8 @@ int security_set_bools(struct selinux_state *state, int len, int *values) policydb->bool_val_to_struct[i]->state = 0; } - for (cur = policydb->cond_list; cur; cur = cur->next) { - rc = evaluate_cond_node(policydb, cur); - if (rc) - goto out; - } + for (cur = policydb->cond_list; cur; cur = cur->next) + evaluate_cond_node(policydb, cur); seqno = ++state->ss->latest_granting; rc = 0; @@ -3013,11 +3010,8 @@ static int security_preserve_bools(struct selinux_state *state, if (booldatum) booldatum->state = bvalues[i]; } - for (cur = policydb->cond_list; cur; cur = cur->next) { - rc = evaluate_cond_node(policydb, cur); - if (rc) - goto out; - } + for (cur = policydb->cond_list; cur; cur = cur->next) + evaluate_cond_node(policydb, cur); out: if (bnames) { |