aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/pipeline/pull.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/protocol/pipeline/pull.c')
-rw-r--r--src/protocol/pipeline/pull.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/src/protocol/pipeline/pull.c b/src/protocol/pipeline/pull.c
index 1ebcc4a2..1d738ec2 100644
--- a/src/protocol/pipeline/pull.c
+++ b/src/protocol/pipeline/pull.c
@@ -170,14 +170,10 @@ static int
nni_pull_sock_setopt(void *arg, int opt, const void *buf, size_t sz)
{
nni_pull_sock *pull = arg;
- int rv;
+ int rv = NNG_ENOTSUP;
- switch (opt) {
- case NNG_OPT_RAW:
+ if (opt == nng_optid_raw) {
rv = nni_setopt_int(&pull->raw, buf, sz, 0, 1);
- break;
- default:
- rv = NNG_ENOTSUP;
}
return (rv);
}
@@ -186,14 +182,10 @@ static int
nni_pull_sock_getopt(void *arg, int opt, void *buf, size_t *szp)
{
nni_pull_sock *pull = arg;
- int rv;
+ int rv = NNG_ENOTSUP;
- switch (opt) {
- case NNG_OPT_RAW:
+ if (opt == nng_optid_raw) {
rv = nni_getopt_int(&pull->raw, buf, szp);
- break;
- default:
- rv = NNG_ENOTSUP;
}
return (rv);
}