aboutsummaryrefslogtreecommitdiff
path: root/tests/sock.c
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2017-01-20 17:47:02 -0800
committerGarrett D'Amore <garrett@damore.org>2017-01-20 17:47:02 -0800
commit4a24ebe175bc3eebf7fbf2ac581b2339a809ace1 (patch)
treeb3048d482412379ff44c1d2217ca512339a771f6 /tests/sock.c
parentcb7e65fd5004fd24a7c23137e849c2828d2de6c3 (diff)
downloadnng-4a24ebe175bc3eebf7fbf2ac581b2339a809ace1.tar.gz
nng-4a24ebe175bc3eebf7fbf2ac581b2339a809ace1.tar.bz2
nng-4a24ebe175bc3eebf7fbf2ac581b2339a809ace1.zip
Dangling compiler warnings from sock handle change.
Diffstat (limited to 'tests/sock.c')
-rw-r--r--tests/sock.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/tests/sock.c b/tests/sock.c
index 9ceb99cb..a41a0093 100644
--- a/tests/sock.c
+++ b/tests/sock.c
@@ -20,11 +20,9 @@ Main({
Convey("We are able to open a PAIR socket", {
int rv;
- nng_socket sock = NULL;
+ nng_socket sock;
- rv = nng_open(&sock, NNG_PROTO_PAIR);
- So(rv == 0);
- So(sock != NULL);
+ So(nng_open(&sock, NNG_PROTO_PAIR) == 0);
Reset({
nng_close(sock);
@@ -137,9 +135,8 @@ Main({
})
Convey("We can connect to it", {
- nng_socket *sock2 = NULL;
- rv = nng_open(&sock2, NNG_PROTO_PAIR);
- So(rv == 0);
+ nng_socket sock2;
+ So(nng_open(&sock2, NNG_PROTO_PAIR) == 0);
rv = nng_dial(sock2, "inproc://here", NULL, NNG_FLAG_SYNCH);
So(rv == 0);
nng_close(sock2);
@@ -147,13 +144,12 @@ Main({
})
Convey("We can send and receive messages", {
- nng_socket sock2 = NULL;
+ nng_socket sock2;
int len = 1;
nng_msg *msg;
uint64_t second = 1000000;
- rv = nng_open(&sock2, NNG_PROTO_PAIR);
- So(rv == 0);
+ So(nng_open(&sock2, NNG_PROTO_PAIR) == 0);
rv = nng_setopt(sock, NNG_OPT_RCVBUF, &len, sizeof (len));
So(rv == 0);