aboutsummaryrefslogtreecommitdiff
path: root/tests/pollfd.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2018-03-20 18:38:54 -0700
committerGarrett D'Amore <garrett@damore.org>2018-03-20 18:42:23 -0700
commit6df40cb6eea9a4220d61c4c927ce5a857a12a338 (patch)
treeac4b7ecbcb41a456eb4d0429fc180047656371ba /tests/pollfd.c
parent9ca901c1b70b17d851426483d9f54611cfa8e395 (diff)
downloadnng-6df40cb6eea9a4220d61c4c927ce5a857a12a338.tar.gz
nng-6df40cb6eea9a4220d61c4c927ce5a857a12a338.tar.bz2
nng-6df40cb6eea9a4220d61c4c927ce5a857a12a338.zip
fixes #301 String option handling for getopt
Diffstat (limited to 'tests/pollfd.c')
-rw-r--r--tests/pollfd.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/tests/pollfd.c b/tests/pollfd.c
index aa07adab..0baa6b2d 100644
--- a/tests/pollfd.c
+++ b/tests/pollfd.c
@@ -116,20 +116,16 @@ TestMain("Poll FDs", {
Convey("We cannot get a send FD for PULL", {
nng_socket s3;
int fd;
- size_t sz;
So(nng_pull0_open(&s3) == 0);
Reset({ nng_close(s3); });
- sz = sizeof(fd);
- So(nng_getopt(s3, NNG_OPT_SENDFD, &fd, &sz) == NNG_ENOTSUP);
+ So(nng_getopt_int(s3, NNG_OPT_SENDFD, &fd) == NNG_ENOTSUP);
});
Convey("We cannot get a recv FD for PUSH", {
nng_socket s3;
int fd;
- size_t sz;
So(nng_push0_open(&s3) == 0);
Reset({ nng_close(s3); });
- sz = sizeof(fd);
- So(nng_getopt(s3, NNG_OPT_RECVFD, &fd, &sz) == NNG_ENOTSUP);
+ So(nng_getopt_int(s3, NNG_OPT_RECVFD, &fd) == NNG_ENOTSUP);
});
})