Skip to content

Commit

Permalink
Smaller bugfixes and testing module works as imagined.
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Ife <[email protected]>
  • Loading branch information
Matthew Ife committed Nov 30, 2020
1 parent ee4e1ed commit 5c8d727
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libsepol/src/hashtab.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ int hashtab_map(hashtab_t h,

for (i = 0; i < h->size; i++) {
cur = h->htable[i];
while (curi != NULL) {
while (cur != NULL) {
next = cur->next;
ret = apply(cur->key, cur->datum, args);
if (ret)
Expand Down
8 changes: 6 additions & 2 deletions libsepol/src/write.c
Original file line number Diff line number Diff line change
Expand Up @@ -2170,7 +2170,7 @@ static void scope_write_destroy(hashtab_key_t key __attribute__ ((unused)),
free(cur);
}

static void type_attr_filter(hashtab_key_t key,
static int type_attr_filter(hashtab_key_t key,
hashtab_datum_t datum, void *args)
{
type_datum_t *typdatum = datum;
Expand All @@ -2186,9 +2186,11 @@ static void type_attr_filter(hashtab_key_t key,
if (scope)
hashtab_remove(scopetbl, key, scope_write_destroy, scope);
}

return 0;
}

static void role_attr_filter(hashtab_key_t key,
static int role_attr_filter(hashtab_key_t key,
hashtab_datum_t datum, void *args)
{
role_datum_t *role = datum;
Expand All @@ -2204,6 +2206,8 @@ static void role_attr_filter(hashtab_key_t key,
if (scope)
hashtab_remove(scopetbl, key, scope_write_destroy, scope);
}

return 0;
}

/*
Expand Down

0 comments on commit 5c8d727

Please sign in to comment.