diff options
author | Zou Wei <zou_wei@huawei.com> | 2020-04-14 16:18:07 +0800 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2020-04-14 18:01:18 -0400 |
commit | 4b8503967ef5d1123d6e0a87d5723bdaeddf8b3f (patch) | |
tree | 83f18e5a5db35055c75a0fe4a7d7091c1bd1b52f /security/selinux/ss/mls.c | |
parent | 8f3d9f354286745c751374f5f1fcafee6b3f3136 (diff) |
selinux: fix warning Comparison to bool
fix below warnings reported by coccicheck
security/selinux/ss/mls.c:539:39-43: WARNING: Comparison to bool
security/selinux/ss/services.c:1815:46-50: WARNING: Comparison to bool
security/selinux/ss/services.c:1827:46-50: WARNING: Comparison to bool
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Zou Wei <zou_wei@huawei.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/mls.c')
-rw-r--r-- | security/selinux/ss/mls.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/security/selinux/ss/mls.c b/security/selinux/ss/mls.c index ec5e3d1da9ac..6a5d7d08933d 100644 --- a/security/selinux/ss/mls.c +++ b/security/selinux/ss/mls.c @@ -536,7 +536,7 @@ int mls_compute_sid(struct policydb *p, /* Fallthrough */ case AVTAB_CHANGE: - if ((tclass == p->process_class) || (sock == true)) + if ((tclass == p->process_class) || sock) /* Use the process MLS attributes. */ return mls_context_cpy(newcontext, scontext); else |