From: Zbigniew Jędrzejewski-Szmek Date: Thu, 21 May 2020 06:17:45 +0000 (+0200) Subject: network: use consistent type when parsing lifetimes X-Git-Tag: v246-rc1~297^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d27357966707b6da940008db8c7a9e263a6897aa;p=thirdparty%2Fsystemd.git network: use consistent type when parsing lifetimes Those fields are both uint32_t, so we should use the same type when parsing. Having a different type didn't change the result, but let's be consistent. --- diff --git a/src/network/networkd-address.c b/src/network/networkd-address.c index 1567bd7ee91..f9bbd05dd8b 100644 --- a/src/network/networkd-address.c +++ b/src/network/networkd-address.c @@ -954,7 +954,7 @@ int config_parse_lifetime(const char *unit, void *userdata) { Network *network = userdata; _cleanup_(address_free_or_set_invalidp) Address *n = NULL; - unsigned k; + uint32_t k; int r; assert(filename); @@ -979,7 +979,7 @@ int config_parse_lifetime(const char *unit, } n->cinfo.ifa_prefered = k; - n = NULL; + TAKE_PTR(n); return 0; } diff --git a/src/network/networkd-dhcp4.c b/src/network/networkd-dhcp4.c index 42e6b5aef2a..8e2c775fcf4 100644 --- a/src/network/networkd-dhcp4.c +++ b/src/network/networkd-dhcp4.c @@ -1691,7 +1691,7 @@ int config_parse_dhcp_fallback_lease_lifetime(const char *unit, void *data, void *userdata) { Network *network = userdata; - unsigned k; + uint32_t k; assert(filename); assert(section);