diff options
Diffstat (limited to 'src/sp/protocol')
| -rw-r--r-- | src/sp/protocol/pubsub0/sub.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/sp/protocol/pubsub0/sub.c b/src/sp/protocol/pubsub0/sub.c index a4741114..1b17fcbf 100644 --- a/src/sp/protocol/pubsub0/sub.c +++ b/src/sp/protocol/pubsub0/sub.c @@ -711,8 +711,7 @@ nng_sub0_socket_subscribe(nng_socket id, const void *buf, size_t sz) nni_sock *s; sub0_sock *sock; - if (((rv = nni_init()) != 0) || - ((rv = nni_sock_find(&s, id.id)) != 0)) { + if ((rv = nni_sock_find(&s, id.id)) != 0) { return (rv); } // validate the socket type @@ -733,8 +732,7 @@ nng_sub0_socket_unsubscribe(nng_socket id, const void *buf, size_t sz) nni_sock *s; sub0_sock *sock; - if (((rv = nni_init()) != 0) || - ((rv = nni_sock_find(&s, id.id)) != 0)) { + if ((rv = nni_sock_find(&s, id.id)) != 0) { return (rv); } // validate the socket type @@ -755,8 +753,7 @@ nng_sub0_ctx_subscribe(nng_ctx id, const void *buf, size_t sz) nni_ctx *c; sub0_ctx *ctx; - if (((rv = nni_init()) != 0) || - ((rv = nni_ctx_find(&c, id.id, false)) != 0)) { + if ((rv = nni_ctx_find(&c, id.id, false)) != 0) { return (rv); } // validate the socket type @@ -777,8 +774,7 @@ nng_sub0_ctx_unsubscribe(nng_ctx id, const void *buf, size_t sz) nni_ctx *c; sub0_ctx *ctx; - if (((rv = nni_init()) != 0) || - ((rv = nni_ctx_find(&c, id.id, false)) != 0)) { + if ((rv = nni_ctx_find(&c, id.id, false)) != 0) { return (rv); } // validate the socket type |
