libsepol: support const avtab_t pointer in avtab_map()
The access vector table itself is not modified in avtab_map() thus support passing a const pointer. Logically the content might be changed by the passed callback, but C does not support transitive const-ness well, and C also does not support function overloading, e.g. like for strchr(3). Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Acked-by: James Carter <jwcart2@gmail.com>
This commit is contained in:
parent
938530171b
commit
d192e4d937
2 changed files with 2 additions and 2 deletions
|
@ -112,7 +112,7 @@ extern avtab_datum_t *avtab_search(avtab_t * h, avtab_key_t * k);
|
|||
|
||||
extern void avtab_destroy(avtab_t * h);
|
||||
|
||||
extern int avtab_map(avtab_t * h,
|
||||
extern int avtab_map(const avtab_t * h,
|
||||
int (*apply) (avtab_key_t * k,
|
||||
avtab_datum_t * d, void *args), void *args);
|
||||
|
||||
|
|
|
@ -330,7 +330,7 @@ void avtab_destroy(avtab_t * h)
|
|||
h->mask = 0;
|
||||
}
|
||||
|
||||
int avtab_map(avtab_t * h,
|
||||
int avtab_map(const avtab_t * h,
|
||||
int (*apply) (avtab_key_t * k,
|
||||
avtab_datum_t * d, void *args), void *args)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue