aboutsummaryrefslogtreecommitdiff
path: root/src/core/idhash.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-01-02 11:28:56 -0800
committerGarrett D'Amore <garrett@damore.org>2017-01-02 11:28:56 -0800
commitcceda25b65423de694f34b3decc7812eb46a4c1e (patch)
tree070e65cba02c013912f6f956b00dcc9470eee5de /src/core/idhash.c
parentc3d8e75f2bb76b5bfafc589f860036cf42cfbaa0 (diff)
downloadnng-cceda25b65423de694f34b3decc7812eb46a4c1e.tar.gz
nng-cceda25b65423de694f34b3decc7812eb46a4c1e.tar.bz2
nng-cceda25b65423de694f34b3decc7812eb46a4c1e.zip
More structure allocation macro conversion.
Diffstat (limited to 'src/core/idhash.c')
-rw-r--r--src/core/idhash.c6
1 files changed, 3 insertions, 3 deletions
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);
}