From 763b8deee1fd38566b85d4745a83adae245d9b26 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 21 Jun 2017 14:04:16 -0700 Subject: Make APIs for holding references more consistent. --- src/core/pipe.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/core/pipe.c') diff --git a/src/core/pipe.c b/src/core/pipe.c index 58703814..80b39171 100644 --- a/src/core/pipe.c +++ b/src/core/pipe.c @@ -102,19 +102,17 @@ nni_pipe_aio_send(nni_pipe *p, nni_aio *aio) void -nni_pipe_incref(nni_pipe *p) +nni_pipe_hold(nni_pipe *p) { int rv; - nni_pipe *scratch; - rv = nni_objhash_find(nni_pipes, p->p_id, (void **) &scratch); + rv = nni_objhash_find(nni_pipes, p->p_id, NULL); NNI_ASSERT(rv == 0); - NNI_ASSERT(p == scratch); } void -nni_pipe_decref(nni_pipe *p) +nni_pipe_rele(nni_pipe *p) { nni_objhash_unref(nni_pipes, p->p_id); } -- cgit v1.2.3-70-g09d2