diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2024-12-16 17:40:04 +0100 |
---|---|---|
committer | Paul Moore <paul@paul-moore.com> | 2025-01-07 23:14:39 -0500 |
commit | 83e7e18eed6e06cd1ce82fa4b9c9a05c24f7a80b (patch) | |
tree | 20fe99dd706e6432ecda7fee213fca24ae7785f8 /security/selinux/ss/ebitmap.c | |
parent | 5e99b81f48cd565a5341c921e62fd09184d6bb72 (diff) |
selinux: rename comparison functions for clarity
The functions context_cmp(), mls_context_cmp() and ebitmap_cmp() are not
traditional C style compare functions returning -1, 0, and 1 for less
than, equal, and greater than; they only return whether their arguments
are equal.
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/ebitmap.c')
-rw-r--r-- | security/selinux/ss/ebitmap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/security/selinux/ss/ebitmap.c b/security/selinux/ss/ebitmap.c index 99c01be15115..1cc1e7e711e3 100644 --- a/security/selinux/ss/ebitmap.c +++ b/security/selinux/ss/ebitmap.c @@ -25,12 +25,12 @@ static struct kmem_cache *ebitmap_node_cachep __ro_after_init; -int ebitmap_cmp(const struct ebitmap *e1, const struct ebitmap *e2) +bool ebitmap_equal(const struct ebitmap *e1, const struct ebitmap *e2) { const struct ebitmap_node *n1, *n2; if (e1->highbit != e2->highbit) - return 0; + return false; n1 = e1->node; n2 = e2->node; @@ -41,9 +41,9 @@ int ebitmap_cmp(const struct ebitmap *e1, const struct ebitmap *e2) } if (n1 || n2) - return 0; + return false; - return 1; + return true; } int ebitmap_cpy(struct ebitmap *dst, const struct ebitmap *src) |