diff options
author | David Timber <mieabby@gmail.com> | 2020-09-17 19:00:28 +0930 |
---|---|---|
committer | David Timber <mieabby@gmail.com> | 2020-09-17 19:00:28 +0930 |
commit | e6953dcb47193746a4f4d9fff0193723fadbb3e6 (patch) | |
tree | b6fe802c3faf48ec7e294fa61207b4e9126fc3c1 /src/strmap.c | |
parent | b54ace5cd8a873be804529f7b8221ee62600d17d (diff) |
* Change value types of containers to uintptr_t
* htbt: fix leak in `htbt_main_q_hover()`
* proone-recon: fix parse bug
Diffstat (limited to 'src/strmap.c')
-rw-r--r-- | src/strmap.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/strmap.c b/src/strmap.c index 81d19b5..4f20831 100644 --- a/src/strmap.c +++ b/src/strmap.c @@ -1,4 +1,5 @@ #include "strmap.h" +#include "util_ct.h" #include "util_rt.h" #include <string.h> @@ -34,7 +35,7 @@ void prne_strmap_clear (prne_strmap_t *map) { const prne_strmap_tuple_t *prne_strmap_insert ( prne_strmap_t *map, const char* key, - void *val) + const prne_strmap_val_t val) { prne_strmap_tuple_t *ret; prne_strmap_tuple_t t; @@ -70,7 +71,7 @@ const prne_strmap_tuple_t *prne_strmap_insert ( qsort(map->tbl, map->size, sizeof(prne_strmap_tuple_t), strmap_cmp_f); ret = (prne_strmap_tuple_t*)prne_strmap_lookup(map, key); - prne_dbgtrap(ret != NULL); + prne_dbgast(ret != NULL); } else { ret->val = t.val; @@ -83,7 +84,7 @@ void prne_strmap_erase (prne_strmap_t *map, const char* key) { prne_strmap_tuple_t t, *e; t.key = key; - t.val = NULL; + t.val = 0; e = (prne_strmap_tuple_t*)bsearch( &t, map->tbl, @@ -120,7 +121,7 @@ const prne_strmap_tuple_t *prne_strmap_lookup ( prne_strmap_tuple_t t; t.key = key; - t.val = NULL; + t.val = 0; return (const prne_strmap_tuple_t*)bsearch( &t, |