From d2c1a9c43c9972b1f85b04903a046f2ad7b36b32 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Tue, 12 Jul 2016 21:49:08 +0000 Subject: [PATCH] MFC r301967 Fix usr.sbin/rpcbind ATF tests on 32-bit platforms usr.sbin/rpcbind/tests/addrmerge_test.c Fix some sizeof calculations that work only by luck on 64-bit platforms. --- usr.sbin/rpcbind/tests/addrmerge_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/rpcbind/tests/addrmerge_test.c b/usr.sbin/rpcbind/tests/addrmerge_test.c index d2bc9e299dbe..23064f683371 100644 --- a/usr.sbin/rpcbind/tests/addrmerge_test.c +++ b/usr.sbin/rpcbind/tests/addrmerge_test.c @@ -92,15 +92,15 @@ mock_ifaddr4(const char* name, const char* addr, const char* mask, in->sin_family = AF_INET; in->sin_port = 0; - in->sin_len = sizeof(in); + in->sin_len = sizeof(*in); in->sin_addr.s_addr = inet_addr(addr); mask_in->sin_family = AF_INET; mask_in->sin_port = 0; - mask_in->sin_len = sizeof(mask_in); + mask_in->sin_len = sizeof(*mask_in); mask_in->sin_addr.s_addr = inet_addr(mask); bcast_in->sin_family = AF_INET; bcast_in->sin_port = 0; - bcast_in->sin_len = sizeof(bcast_in); + bcast_in->sin_len = sizeof(*bcast_in); bcast_in->sin_addr.s_addr = inet_addr(bcast); *ifaddr = (struct ifaddrs) { .ifa_next = NULL,