diff options
| author | Garrett D'Amore <garrett@damore.org> | 2025-04-27 23:35:25 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2025-04-27 23:35:25 -0700 |
| commit | 7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4 (patch) | |
| tree | 5a3036d609404ee5218b6189a89799e70f4623df /src/core/sockfd.c | |
| parent | 70ae513e4dda50864f7d45b6676549ed5246144d (diff) | |
| download | nng-7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4.tar.gz nng-7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4.tar.bz2 nng-7bb5ab9c4f70c9fa0a67a22c4aee83b0109318c4.zip | |
Converted property functions to use nng_err.
Diffstat (limited to 'src/core/sockfd.c')
| -rw-r--r-- | src/core/sockfd.c | 14 |
1 files changed, 7 insertions, 7 deletions
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) { |
