We must call htab_remove_elt with an element (in this case, a mocked-up
one with only the key populated, since no reasonable hash function will
need the other fields), not with the key alone.
libctf/
* ctf-hash.c (ctf_dynhash_remove): Call with a mocked-up element.
+2019-06-28 Nick Alcock <nick.alcock@oracle.com>
+
+ * ctf-hash.c (ctf_dynhash_remove): Call with a mocked-up element.
+
2019-06-28 Nick Alcock <nick.alcock@oracle.com>
* ctf-dump.c (ctf_dump_format_type): Prefix hex strings with 0x.
void
ctf_dynhash_remove (ctf_dynhash_t *hp, const void *key)
{
- htab_remove_elt (hp->htab, (void *) key);
+ ctf_helem_t hep = { (void *) key, NULL, NULL, NULL };
+ htab_remove_elt (hp->htab, &hep);
}
void *