Skip to content

Commit 5c8d727

Browse files
author
Matthew Ife
committed
Smaller bugfixes and testing module works as imagined.
Signed-off-by: Matthew Ife <[email protected]>
1 parent ee4e1ed commit 5c8d727

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

libsepol/src/hashtab.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ int hashtab_map(hashtab_t h,
230230

231231
for (i = 0; i < h->size; i++) {
232232
cur = h->htable[i];
233-
while (curi != NULL) {
233+
while (cur != NULL) {
234234
next = cur->next;
235235
ret = apply(cur->key, cur->datum, args);
236236
if (ret)

libsepol/src/write.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2170,7 +2170,7 @@ static void scope_write_destroy(hashtab_key_t key __attribute__ ((unused)),
21702170
free(cur);
21712171
}
21722172

2173-
static void type_attr_filter(hashtab_key_t key,
2173+
static int type_attr_filter(hashtab_key_t key,
21742174
hashtab_datum_t datum, void *args)
21752175
{
21762176
type_datum_t *typdatum = datum;
@@ -2186,9 +2186,11 @@ static void type_attr_filter(hashtab_key_t key,
21862186
if (scope)
21872187
hashtab_remove(scopetbl, key, scope_write_destroy, scope);
21882188
}
2189+
2190+
return 0;
21892191
}
21902192

2191-
static void role_attr_filter(hashtab_key_t key,
2193+
static int role_attr_filter(hashtab_key_t key,
21922194
hashtab_datum_t datum, void *args)
21932195
{
21942196
role_datum_t *role = datum;
@@ -2204,6 +2206,8 @@ static void role_attr_filter(hashtab_key_t key,
22042206
if (scope)
22052207
hashtab_remove(scopetbl, key, scope_write_destroy, scope);
22062208
}
2209+
2210+
return 0;
22072211
}
22082212

22092213
/*

0 commit comments

Comments
 (0)