netof.c (ntp-4.2.8p14) | : | netof.c (ntp-4.2.8p15) | ||
---|---|---|---|---|
skipping to change at line 88 | skipping to change at line 88 | |||
} } }; // 2001:0db8:85a3:08d3:1319:8a2e:0370:7334 | } } }; // 2001:0db8:85a3:08d3:1319:8a2e:0370:7334 | |||
const struct in6_addr expected_address = { { { | const struct in6_addr expected_address = { { { | |||
0x20, 0x01, 0x0d, 0xb8, | 0x20, 0x01, 0x0d, 0xb8, | |||
0x85, 0xa3, 0x08, 0xd3, | 0x85, 0xa3, 0x08, 0xd3, | |||
0x00, 0x00, 0x00, 0x00, | 0x00, 0x00, 0x00, 0x00, | |||
0x00, 0x00, 0x00, 0x00 | 0x00, 0x00, 0x00, 0x00 | |||
} } }; // 2001:0db8:85a3:08d3:0000:0000:0000:0000 | } } }; // 2001:0db8:85a3:08d3:0000:0000:0000:0000 | |||
sockaddr_u input; | sockaddr_u input; | |||
memset(&input, 0, sizeof(input)); | ||||
input.sa6.sin6_family = AF_INET6; | input.sa6.sin6_family = AF_INET6; | |||
input.sa6.sin6_addr = input_address; | input.sa6.sin6_addr = input_address; | |||
SET_PORT(&input, 3000); | SET_PORT(&input, 3000); | |||
sockaddr_u expected; | sockaddr_u expected; | |||
memset(&expected, 0, sizeof(expected)); | ||||
expected.sa6.sin6_family = AF_INET6; | expected.sa6.sin6_family = AF_INET6; | |||
expected.sa6.sin6_addr = expected_address; | expected.sa6.sin6_addr = expected_address; | |||
SET_PORT(&expected, 3000); | SET_PORT(&expected, 3000); | |||
sockaddr_u* actual = netof(&input); | sockaddr_u* actual = netof(&input); | |||
TEST_ASSERT_TRUE(actual != NULL); | TEST_ASSERT_TRUE(actual != NULL); | |||
TEST_ASSERT_TRUE(IsEqual(expected, *actual)); | TEST_ASSERT_TRUE(IsEqual(expected, *actual)); | |||
return; | return; | |||
End of changes. 2 change blocks. | ||||
0 lines changed or deleted | 2 lines changed or added |