From 8249242a9325a27e57107d78bfa168e918cc4f7a Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Sun, 3 Nov 2024 08:29:55 -0800 Subject: Remove untyped nng_pipe_get, support for untyped sockaddr set. This is a step on the path to removing unsafe untyped option accesses. --- tests/tcpsupp.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'tests/tcpsupp.c') diff --git a/tests/tcpsupp.c b/tests/tcpsupp.c index ac1ed200..be947129 100644 --- a/tests/tcpsupp.c +++ b/tests/tcpsupp.c @@ -27,21 +27,18 @@ TestMain("Supplemental TCP", { }); Convey("Listener listens (wildcard)", { nng_sockaddr sa; - size_t sz; uint8_t ip[4]; So(nng_stream_listener_alloc(&l, "tcp://127.0.0.1") == 0); So(nng_stream_listener_listen(l) == 0); - sz = sizeof(sa); ip[0] = 127; ip[1] = 0; ip[2] = 0; ip[3] = 1; - So(nng_stream_listener_get( - l, NNG_OPT_LOCADDR, &sa, &sz) == 0); - So(sz == sizeof(sa)); + So(nng_stream_listener_get_addr( + l, NNG_OPT_LOCADDR, &sa) == 0); So(sa.s_in.sa_port != 0); So(memcmp(&sa.s_in.sa_addr, ip, 4) == 0); -- cgit v1.2.3-70-g09d2