diff options
| author | Michael Biebl <biebl@debian.org> | 2019-08-06 22:47:09 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2019-08-06 22:47:09 +0200 |
| commit | 665270502c3d7c0d002ad76fefb1b7699794cd49 (patch) | |
| tree | 9bc6f4f79278c2a719e1839188f763655a6370ca /shared/n-dhcp4/src | |
| parent | 3192a21b21d4a9d276a7f2ef4e4b0fcf3165d9eb (diff) | |
| parent | 5c79b900b59a5ad162ecc836e424468207ff031e (diff) | |
Update upstream source from tag 'upstream/1.20.0'
Update to upstream version '1.20.0' with Debian dir 832bc2b5ac5f253004165f6354c938efbe172206
Diffstat (limited to 'shared/n-dhcp4/src')
| -rw-r--r-- | shared/n-dhcp4/src/n-dhcp4-c-lease.c | 5 | ||||
| -rw-r--r-- | shared/n-dhcp4/src/n-dhcp4-outgoing.c | 4 |
2 files changed, 3 insertions, 6 deletions
diff --git a/shared/n-dhcp4/src/n-dhcp4-c-lease.c b/shared/n-dhcp4/src/n-dhcp4-c-lease.c index db1ffbae..208ad92a 100644 --- a/shared/n-dhcp4/src/n-dhcp4-c-lease.c +++ b/shared/n-dhcp4/src/n-dhcp4-c-lease.c @@ -44,10 +44,7 @@ static int n_dhcp4_incoming_get_timeouts(NDhcp4Incoming *message, uint64_t *t1p, } else if (u32 == UINT32_MAX) { lifetime = UINT64_MAX; } else { - if (u32 == UINT32_MAX) - lifetime = UINT64_MAX; - else - lifetime = u32 * (1000000000ULL); + lifetime = u32 * (1000000000ULL); } r = n_dhcp4_incoming_query_t2(message, &u32); diff --git a/shared/n-dhcp4/src/n-dhcp4-outgoing.c b/shared/n-dhcp4/src/n-dhcp4-outgoing.c index c44b5880..99123308 100644 --- a/shared/n-dhcp4/src/n-dhcp4-outgoing.c +++ b/shared/n-dhcp4/src/n-dhcp4-outgoing.c @@ -54,8 +54,6 @@ int n_dhcp4_outgoing_new(NDhcp4Outgoing **outgoingp, size_t max_size, uint8_t overload) { _c_cleanup_(n_dhcp4_outgoing_freep) NDhcp4Outgoing *outgoing = NULL; - c_assert(!(overload & ~(N_DHCP4_OVERLOAD_FILE | N_DHCP4_OVERLOAD_SNAME))); - /* * Make sure the minimum limit is bigger than the maximum protocol * header plus the DHCP-message-header plus a single OPTION_END byte. @@ -64,6 +62,8 @@ int n_dhcp4_outgoing_new(NDhcp4Outgoing **outgoingp, size_t max_size, uint8_t ov sizeof(NDhcp4Message) + 1, "Invalid minimum IP packet limit"); + c_assert(!(overload & ~(N_DHCP4_OVERLOAD_FILE | N_DHCP4_OVERLOAD_SNAME))); + outgoing = calloc(1, sizeof(*outgoing)); if (!outgoing) return -ENOMEM; |