aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol/pubsub0/pub.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2021-12-25 18:01:49 -0800
committerGarrett D'Amore <garrett@damore.org>2021-12-25 18:05:56 -0800
commit7b02ddc2d7077439992a10bb69553f89b5ee5903 (patch)
treec3c6467330be2b38491f0df061d7016e713b1892 /src/sp/protocol/pubsub0/pub.c
parent6237d268514e1f8aec562052954db22c4540eec3 (diff)
downloadnng-7b02ddc2d7077439992a10bb69553f89b5ee5903.tar.gz
nng-7b02ddc2d7077439992a10bb69553f89b5ee5903.tar.bz2
nng-7b02ddc2d7077439992a10bb69553f89b5ee5903.zip
Socket and context initialization never fails.
This makes these functions entirely bullet proof, and eliminates yet more error handling cases.
Diffstat (limited to 'src/sp/protocol/pubsub0/pub.c')
-rw-r--r--src/sp/protocol/pubsub0/pub.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/sp/protocol/pubsub0/pub.c b/src/sp/protocol/pubsub0/pub.c
index 3911127a..b0a9ef07 100644
--- a/src/sp/protocol/pubsub0/pub.c
+++ b/src/sp/protocol/pubsub0/pub.c
@@ -64,7 +64,7 @@ pub0_sock_fini(void *arg)
nni_mtx_fini(&s->mtx);
}
-static int
+static void
pub0_sock_init(void *arg, nni_sock *ns)
{
pub0_sock *sock = arg;
@@ -74,7 +74,6 @@ pub0_sock_init(void *arg, nni_sock *ns)
nni_mtx_init(&sock->mtx);
NNI_LIST_INIT(&sock->pipes, pub0_pipe, node);
sock->sendbuf = 16; // fairly arbitrary
- return (0);
}
static void