diff options
Diffstat (limited to 'src/protocol/pubsub0')
| -rw-r--r-- | src/protocol/pubsub0/pub.c | 8 | ||||
| -rw-r--r-- | src/protocol/pubsub0/sub.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/protocol/pubsub0/pub.c b/src/protocol/pubsub0/pub.c index 33ecb5ba..ff110d56 100644 --- a/src/protocol/pubsub0/pub.c +++ b/src/protocol/pubsub0/pub.c @@ -40,7 +40,7 @@ static void pub0_pipe_fini(void *); // pub0_sock is our per-socket protocol private structure. struct pub0_sock { nni_msgq *uwq; - int raw; + bool raw; nni_aio * aio_getq; nni_list pipes; nni_mtx mtx; @@ -83,7 +83,7 @@ pub0_sock_init(void **sp, nni_sock *sock) return (rv); } - s->raw = 0; + s->raw = false; NNI_LIST_INIT(&s->pipes, pub0_pipe, node); s->uwq = nni_sock_sendq(sock); @@ -277,14 +277,14 @@ static int pub0_sock_setopt_raw(void *arg, const void *buf, size_t sz) { pub0_sock *s = arg; - return (nni_setopt_int(&s->raw, buf, sz, 0, 1)); + return (nni_setopt_bool(&s->raw, buf, sz)); } static int pub0_sock_getopt_raw(void *arg, void *buf, size_t *szp) { pub0_sock *s = arg; - return (nni_getopt_int(s->raw, buf, szp)); + return (nni_getopt_bool(s->raw, buf, szp)); } static void diff --git a/src/protocol/pubsub0/sub.c b/src/protocol/pubsub0/sub.c index 8803ab19..d9d0d5f3 100644 --- a/src/protocol/pubsub0/sub.c +++ b/src/protocol/pubsub0/sub.c @@ -44,7 +44,7 @@ struct sub0_topic { struct sub0_sock { nni_list topics; nni_msgq *urq; - int raw; + bool raw; nni_mtx lk; }; @@ -66,7 +66,7 @@ sub0_sock_init(void **sp, nni_sock *sock) } nni_mtx_init(&s->lk); NNI_LIST_INIT(&s->topics, sub0_topic, node); - s->raw = 0; + s->raw = false; s->urq = nni_sock_recvq(sock); *sp = s; @@ -279,14 +279,14 @@ static int sub0_sock_setopt_raw(void *arg, const void *buf, size_t sz) { sub0_sock *s = arg; - return (nni_setopt_int(&s->raw, buf, sz, 0, 1)); + return (nni_setopt_bool(&s->raw, buf, sz)); } static int sub0_sock_getopt_raw(void *arg, void *buf, size_t *szp) { sub0_sock *s = arg; - return (nni_getopt_int(s->raw, buf, szp)); + return (nni_getopt_bool(s->raw, buf, szp)); } static void |
