The first patch is just a cleanup to have a single hashtab function that can add elements, simplifying slightly the second patch, which implements the actual auto-growing of hash tables. Please see the log messages of the patches for more details. v2: simplify entry insertion in hashtab_check_resize() Ondrej Mosnacek (2): libsepol,newrole: remove unused hashtab functions libsepol: grow hashtab dynamically libsepol/include/sepol/policydb/hashtab.h | 28 ----- libsepol/src/hashtab.c | 126 +++++++--------------- policycoreutils/newrole/hashtab.c | 85 --------------- policycoreutils/newrole/hashtab.h | 28 ----- 4 files changed, 41 insertions(+), 226 deletions(-) -- 2.24.1