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/sp/protocol/reqrep0/xrep.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/sp/protocol/reqrep0/xrep.c') diff --git a/src/sp/protocol/reqrep0/xrep.c b/src/sp/protocol/reqrep0/xrep.c index 1a5f6e24..fe6c9fde 100644 --- a/src/sp/protocol/reqrep0/xrep.c +++ b/src/sp/protocol/reqrep0/xrep.c @@ -353,19 +353,20 @@ xrep0_pipe_putq_cb(void *arg) nni_pipe_recv(p->pipe, &p->aio_recv); } -static int +static nng_err xrep0_sock_set_maxttl(void *arg, const void *buf, size_t sz, nni_opt_type t) { xrep0_sock *s = arg; int ttl; - int rv; - if ((rv = nni_copyin_int(&ttl, buf, sz, 1, NNI_MAX_MAX_TTL, t)) == 0) { + nng_err rv; + if ((rv = nni_copyin_int(&ttl, buf, sz, 1, NNI_MAX_MAX_TTL, t)) == + NNG_OK) { nni_atomic_set(&s->ttl, ttl); } return (rv); } -static int +static nng_err xrep0_sock_get_maxttl(void *arg, void *buf, size_t *szp, nni_opt_type t) { xrep0_sock *s = arg; -- cgit v1.2.3-70-g09d2