diff options
Diffstat (limited to 'src/sp/transport/socket/sockfd.c')
| -rw-r--r-- | src/sp/transport/socket/sockfd.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/sp/transport/socket/sockfd.c b/src/sp/transport/socket/sockfd.c index e7b25d8b..c50360af 100644 --- a/src/sp/transport/socket/sockfd.c +++ b/src/sp/transport/socket/sockfd.c @@ -739,11 +739,11 @@ sfd_tran_ep_cancel(nni_aio *aio, void *arg, nng_err rv) nni_mtx_unlock(&ep->mtx); } -static int +static nng_err sfd_tran_ep_get_recvmaxsz(void *arg, void *v, size_t *szp, nni_opt_type t) { sfd_tran_ep *ep = arg; - int rv; + nng_err rv; nni_mtx_lock(&ep->mtx); rv = nni_copyout_size(ep->rcvmax, v, szp, t); @@ -751,13 +751,13 @@ sfd_tran_ep_get_recvmaxsz(void *arg, void *v, size_t *szp, nni_opt_type t) return (rv); } -static int +static nng_err sfd_tran_ep_set_recvmaxsz(void *arg, const void *v, size_t sz, nni_opt_type t) { sfd_tran_ep *ep = arg; size_t val; - int rv; - if ((rv = nni_copyin_size(&val, v, sz, 0, NNI_MAXSZ, t)) == 0) { + nng_err rv; + if ((rv = nni_copyin_size(&val, v, sz, 0, NNI_MAXSZ, t)) == NNG_OK) { nni_mtx_lock(&ep->mtx); ep->rcvmax = val; nni_mtx_unlock(&ep->mtx); |
