aboutsummaryrefslogtreecommitdiff
path: root/src/sp
diff options
context:
space:
mode:
Diffstat (limited to 'src/sp')
-rw-r--r--src/sp/protocol/pubsub0/sub.c12
-rw-r--r--src/sp/transport/tls/tls.c6
2 files changed, 4 insertions, 14 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
diff --git a/src/sp/transport/tls/tls.c b/src/sp/transport/tls/tls.c
index 387ce023..8ea92888 100644
--- a/src/sp/transport/tls/tls.c
+++ b/src/sp/transport/tls/tls.c
@@ -1320,12 +1320,6 @@ static nni_sp_tran tls6_tran = {
};
#endif
-int
-nng_tls_register(void)
-{
- return (nni_init());
-}
-
void
nni_sp_tls_register(void)
{