diff options
| author | Garrett D'Amore <garrett@damore.org> | 2024-11-03 08:29:55 -0800 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2024-11-03 08:30:34 -0800 |
| commit | 8249242a9325a27e57107d78bfa168e918cc4f7a (patch) | |
| tree | 3fa7a7a0dd66c23684b731f6b2686e9b6ea7a574 /tests/tcpsupp.c | |
| parent | a5807e45b1badfb5d0cb4f697e1873a8ece59a30 (diff) | |
| download | nng-8249242a9325a27e57107d78bfa168e918cc4f7a.tar.gz nng-8249242a9325a27e57107d78bfa168e918cc4f7a.tar.bz2 nng-8249242a9325a27e57107d78bfa168e918cc4f7a.zip | |
Remove untyped nng_pipe_get, support for untyped sockaddr set.
This is a step on the path to removing unsafe untyped option accesses.
Diffstat (limited to 'tests/tcpsupp.c')
| -rw-r--r-- | tests/tcpsupp.c | 7 |
1 files changed, 2 insertions, 5 deletions
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); |
