From 7b02ddc2d7077439992a10bb69553f89b5ee5903 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sat, 25 Dec 2021 18:01:49 -0800 Subject: Socket and context initialization never fails. This makes these functions entirely bullet proof, and eliminates yet more error handling cases. --- src/sp/protocol/bus0/bus.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/sp/protocol/bus0') 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 -- cgit v1.2.3-70-g09d2