From cceda25b65423de694f34b3decc7812eb46a4c1e Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Mon, 2 Jan 2017 11:28:56 -0800 Subject: More structure allocation macro conversion. --- src/core/idhash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/core/idhash.c') diff --git a/src/core/idhash.c b/src/core/idhash.c index 785f3835..58b68bbf 100644 --- a/src/core/idhash.c +++ b/src/core/idhash.c @@ -32,12 +32,12 @@ nni_idhash_create(nni_idhash **hp) { nni_idhash *h; - if ((h = nni_alloc(sizeof (*h))) == NULL) { + if ((h = NNI_ALLOC_STRUCT(h)) == NULL) { return (NNG_ENOMEM); } h->ih_entries = nni_alloc(8 * sizeof (nni_idhash_entry)); if (h->ih_entries == NULL) { - nni_free(h, sizeof (*h)); + NNI_FREE_STRUCT(h); return (NNG_ENOMEM); } (void) memset(h->ih_entries, 0, (8 * sizeof (nni_idhash_entry))); @@ -56,7 +56,7 @@ void nni_idhash_destroy(nni_idhash *h) { nni_free(h->ih_entries, h->ih_cap * sizeof (nni_idhash_entry)); - nni_free(h, sizeof (*h)); + NNI_FREE_STRUCT(h); } -- cgit v1.2.3-70-g09d2