From 7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 27 Apr 2025 23:35:25 -0700 Subject: Converted property functions to use nng_err. --- src/core/sockfd.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/core/sockfd.c') diff --git a/src/core/sockfd.c b/src/core/sockfd.c index 3a43359d..651fcd63 100644 --- a/src/core/sockfd.c +++ b/src/core/sockfd.c @@ -135,15 +135,15 @@ sfd_listener_accept(void *arg, nng_aio *aio) nni_mtx_unlock(&l->mtx); } -static int +static nng_err sfd_listener_set_fd(void *arg, const void *buf, size_t sz, nni_type t) { sfd_listener *l = arg; nni_aio *aio; int fd; - int rv; + nng_err rv; - if ((rv = nni_copyin_int(&fd, buf, sz, 0, NNI_MAXINT, t)) != 0) { + if ((rv = nni_copyin_int(&fd, buf, sz, 0, NNI_MAXINT, t)) != NNG_OK) { return (rv); } @@ -167,10 +167,10 @@ sfd_listener_set_fd(void *arg, const void *buf, size_t sz, nni_type t) } nni_mtx_unlock(&l->mtx); - return (0); + return (NNG_OK); } -static int +static nng_err sfd_listener_get_addr(void *arg, void *buf, size_t *szp, nni_type t) { NNI_ARG_UNUSED(arg); @@ -193,7 +193,7 @@ static const nni_option sfd_listener_options[] = { }, }; -static int +static nng_err sfd_listener_get( void *arg, const char *name, void *buf, size_t *szp, nni_type t) { @@ -201,7 +201,7 @@ sfd_listener_get( return (nni_getopt(sfd_listener_options, name, l, buf, szp, t)); } -static int +static nng_err sfd_listener_set( void *arg, const char *name, const void *buf, size_t sz, nni_type t) { -- cgit v1.2.3-70-g09d2