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.
This commit is contained in:
Alan Somers 2016-07-12 21:49:08 +00:00
parent 4ca9b1bbcd
commit d2c1a9c43c
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=302676

View File

@ -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,