summaryrefslogtreecommitdiffstats
path: root/security/selinux/ss
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2011-04-28 21:11:21 +0200
committerEric Paris <eparis@redhat.com>2011-04-28 21:15:52 +0200
commit3f058ef7787e1b48720622346de9a5317aeb749a (patch)
tree3cfdfa068b6eae4716f3be7d02f44bbd15e64573 /security/selinux/ss
parentSELinux: calculate and print hashtab stats with a generic function (diff)
downloadlinux-3f058ef7787e1b48720622346de9a5317aeb749a.tar.xz
linux-3f058ef7787e1b48720622346de9a5317aeb749a.zip
SELinux: generic hashtab entry counter
Instead of a hashtab entry counter function only useful for range transition rules make a function generic for any hashtable to use. Signed-off-by: Eric Paris <eparis@redhat.com> Reviewed-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'security/selinux/ss')
-rw-r--r--security/selinux/ss/policydb.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/security/selinux/ss/policydb.c b/security/selinux/ss/policydb.c
index 70c863bf715e..ca7a7231b5a2 100644
--- a/security/selinux/ss/policydb.c
+++ b/security/selinux/ss/policydb.c
@@ -3066,7 +3066,7 @@ static int genfs_write(struct policydb *p, void *fp)
return 0;
}
-static int range_count(void *key, void *data, void *ptr)
+static int hashtab_cnt(void *key, void *data, void *ptr)
{
int *cnt = ptr;
*cnt = *cnt + 1;
@@ -3114,7 +3114,7 @@ static int range_write(struct policydb *p, void *fp)
/* count the number of entries in the hashtab */
nel = 0;
- rc = hashtab_map(p->range_tr, range_count, &nel);
+ rc = hashtab_map(p->range_tr, hashtab_cnt, &nel);
if (rc)
return rc;