diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-06-21 14:04:16 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-06-21 14:04:16 -0700 |
| commit | 763b8deee1fd38566b85d4745a83adae245d9b26 (patch) | |
| tree | 00404dbc8e6c07fc5a9d8e07f353beff3adefd5a /src/core/pipe.c | |
| parent | f81c7e8cc84bd43bfc3cc5e41f773a0078870312 (diff) | |
| download | nng-763b8deee1fd38566b85d4745a83adae245d9b26.tar.gz nng-763b8deee1fd38566b85d4745a83adae245d9b26.tar.bz2 nng-763b8deee1fd38566b85d4745a83adae245d9b26.zip | |
Make APIs for holding references more consistent.
Diffstat (limited to 'src/core/pipe.c')
| -rw-r--r-- | src/core/pipe.c | 8 |
1 files changed, 3 insertions, 5 deletions
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); } |
