summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/dhcp6-option.c
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2018-01-15 17:15:13 +0200
committerPatrik Flykt <patrik.flykt@linux.intel.com>2018-01-15 18:00:33 +0200
commit3c03564911d2e0b6e838fa40ba92716367bf17ed (patch)
tree51d5a92d79b8e0ad258b3dd27550e5ec65fdb374 /src/libsystemd-network/dhcp6-option.c
parent01816fee337f7899b7d196f5847e4a2e6a738437 (diff)
downloadsystemd-3c03564911d2e0b6e838fa40ba92716367bf17ed.tar.gz
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.
Diffstat (limited to 'src/libsystemd-network/dhcp6-option.c')
-rw-r--r--src/libsystemd-network/dhcp6-option.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libsystemd-network/dhcp6-option.c b/src/libsystemd-network/dhcp6-option.c
index 784a11dc9d..7c6a6c4e08 100644
--- a/src/libsystemd-network/dhcp6-option.c
+++ b/src/libsystemd-network/dhcp6-option.c
@@ -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);