libctf: fix hash removal
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.
This commit is contained in:
parent
c550e7ba93
commit
3e10cffc98
@ -1,3 +1,7 @@
|
|||||||
|
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>
|
2019-06-28 Nick Alcock <nick.alcock@oracle.com>
|
||||||
|
|
||||||
* ctf-dump.c (ctf_dump_format_type): Prefix hex strings with 0x.
|
* ctf-dump.c (ctf_dump_format_type): Prefix hex strings with 0x.
|
||||||
|
@ -176,7 +176,8 @@ ctf_dynhash_insert (ctf_dynhash_t *hp, void *key, void *value)
|
|||||||
void
|
void
|
||||||
ctf_dynhash_remove (ctf_dynhash_t *hp, const void *key)
|
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 *
|
void *
|
||||||
|
Loading…
Reference in New Issue
Block a user