From 85ccb0066a86a3558ae81cd357463f8dc631f94b Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Wed, 14 Mar 2018 15:40:46 -0700 Subject: fixes #289 nng_sockaddr could just be a union fixes #290 sockaddr improvements --- tests/ws.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'tests/ws.c') diff --git a/tests/ws.c b/tests/ws.c index 4a8bd7a7..32175e9c 100644 --- a/tests/ws.c +++ b/tests/ws.c @@ -37,17 +37,17 @@ check_props_v4(nng_msg *msg) z = sizeof(nng_sockaddr); So(nng_pipe_getopt(p, NNG_OPT_LOCADDR, &la, &z) == 0); So(z == sizeof(la)); - So(la.s_un.s_family == NNG_AF_INET); - So(la.s_un.s_in.sa_port == htons(trantest_port - 1)); - So(la.s_un.s_in.sa_port != 0); - So(la.s_un.s_in.sa_addr == htonl(0x7f000001)); + So(la.s_family == NNG_AF_INET); + So(la.s_in.sa_port == htons(trantest_port - 1)); + So(la.s_in.sa_port != 0); + So(la.s_in.sa_addr == htonl(0x7f000001)); z = sizeof(nng_sockaddr); So(nng_pipe_getopt(p, NNG_OPT_REMADDR, &ra, &z) == 0); So(z == sizeof(ra)); - So(ra.s_un.s_family == NNG_AF_INET); - So(ra.s_un.s_in.sa_port != 0); - So(ra.s_un.s_in.sa_addr == htonl(0x7f000001)); + So(ra.s_family == NNG_AF_INET); + So(ra.s_in.sa_port != 0); + So(ra.s_in.sa_addr == htonl(0x7f000001)); // Request Header z = 0; -- cgit v1.2.3-70-g09d2