aboutsummaryrefslogtreecommitdiff
path: root/src/sp/protocol/bus0
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/bus0
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/bus0')
-rw-r--r--src/sp/protocol/bus0/bus.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/sp/protocol/bus0/bus.c b/src/sp/protocol/bus0/bus.c
index 5ec393ba..ab857d72 100644
--- a/src/sp/protocol/bus0/bus.c
+++ b/src/sp/protocol/bus0/bus.c
@@ -72,7 +72,7 @@ bus0_sock_fini(void *arg)
nni_mtx_fini(&s->mtx);
}
-static int
+static void
bus0_sock_init(void *arg, nni_sock *nsock)
{
bus0_sock *s = arg;
@@ -83,11 +83,9 @@ bus0_sock_init(void *arg, nni_sock *nsock)
s->uwq = nni_sock_sendq(nsock);
s->urq = nni_sock_recvq(nsock);
s->raw = false;
-
- return (0);
}
-static int
+static void
bus0_sock_init_raw(void *arg, nni_sock *nsock)
{
bus0_sock *s = arg;
@@ -98,8 +96,6 @@ bus0_sock_init_raw(void *arg, nni_sock *nsock)
s->uwq = nni_sock_sendq(nsock);
s->urq = nni_sock_recvq(nsock);
s->raw = true;
-
- return (0);
}
static void