From 498a196b805d335f2856b19f27db0d3c87a33088 Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Thu, 16 Jun 2016 15:25:37 +0000 Subject: [PATCH] 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. PR: 210314 Reviewed by: ngie Approved by: re (kib) Reported by: Mark Millard MFC after: 4 weeks Sponsored by: Spectra Logic Corp Differential Revision: https://reviews.freebsd.org/D6855 --- 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,