Skip to content

Commit 3f058ef

Browse files
committed
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 <[email protected]> Reviewed-by: James Morris <[email protected]>
1 parent be30b16 commit 3f058ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

security/selinux/ss/policydb.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3066,7 +3066,7 @@ static int genfs_write(struct policydb *p, void *fp)
30663066
return 0;
30673067
}
30683068

3069-
static int range_count(void *key, void *data, void *ptr)
3069+
static int hashtab_cnt(void *key, void *data, void *ptr)
30703070
{
30713071
int *cnt = ptr;
30723072
*cnt = *cnt + 1;
@@ -3114,7 +3114,7 @@ static int range_write(struct policydb *p, void *fp)
31143114

31153115
/* count the number of entries in the hashtab */
31163116
nel = 0;
3117-
rc = hashtab_map(p->range_tr, range_count, &nel);
3117+
rc = hashtab_map(p->range_tr, hashtab_cnt, &nel);
31183118
if (rc)
31193119
return rc;
31203120

0 commit comments

Comments
 (0)