diff options
author | Patrik Flykt <patrik.flykt@linux.intel.com> | 2018-01-15 16:15:13 +0100 |
---|---|---|
committer | Patrik Flykt <patrik.flykt@linux.intel.com> | 2018-01-15 17:00:33 +0100 |
commit | 3c03564911d2e0b6e838fa40ba92716367bf17ed (patch) | |
tree | 51d5a92d79b8e0ad258b3dd27550e5ec65fdb374 /src/libsystemd-network/dhcp6-option.c | |
parent | Merge pull request #7884 from yuwata/small-fixes (diff) | |
download | systemd-3c03564911d2e0b6e838fa40ba92716367bf17ed.tar.xz systemd-3c03564911d2e0b6e838fa40ba92716367bf17ed.zip |
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 '')
-rw-r--r-- | src/libsystemd-network/dhcp6-option.c | 2 |
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); |