libsystemd-dhcp: Check test result without casting value

This commit is contained in:
Patrik Flykt
2013-12-22 14:28:00 +01:00
committed by Tom Gundersen
parent 0c6a3c888a
commit 2fba7b03b5
+1 -7
View File
@@ -119,13 +119,7 @@ static void test_checksum(void)
0xff, 0xff, 0xff, 0xff
};
uint8_t check[2] = {
0x78, 0xae
};
uint16_t *val = (uint16_t *)check;
assert(client_checksum(&buf, 20) == *val);
assert(client_checksum(&buf, 20) == be16toh(0x78ae));
}
static int check_options(uint8_t code, uint8_t len, const uint8_t *option,