dhcp6: Fix valgrind nitpick about returned test case value

Calling dhcp6_option_parse_address() will always return a value
< 0 on error even though lt_valid remains unset. This is more
than valgrind can safely detect, but let's fix the valgrind
nitpick anyway.

While fixing, use UINT32_MAX instead of ~0 on the same line.
This commit is contained in:
Patrik Flykt
2018-01-15 18:00:33 +02:00
parent 01816fee33
commit 3c03564911
+1 -1
View File
@@ -358,7 +358,7 @@ int dhcp6_option_parse_ia(DHCP6Option *iaoption, DHCP6IA *ia) {
int r = 0, status;
uint16_t opt;
size_t iaaddr_offset;
uint32_t lt_t1, lt_t2, lt_valid, lt_min = ~0;
uint32_t lt_t1, lt_t2, lt_valid = 0, lt_min = UINT32_MAX;
assert_return(ia, -EINVAL);
assert_return(!ia->addresses, -EINVAL);