From: Beniamino Galvani Date: Mon, 15 Feb 2016 15:11:51 +0000 (+0100) Subject: dhcp: assert the success of sd_event_now() X-Git-Tag: v230~358^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F2620%2Fhead;p=thirdparty%2Fsystemd.git dhcp: assert the success of sd_event_now() The function must never fail. --- diff --git a/src/libsystemd-network/sd-dhcp-client.c b/src/libsystemd-network/sd-dhcp-client.c index cad1a52c098..5fd59f7dd39 100644 --- a/src/libsystemd-network/sd-dhcp-client.c +++ b/src/libsystemd-network/sd-dhcp-client.c @@ -958,7 +958,7 @@ static int client_initialize_time_events(sd_dhcp_client *client) { client->timeout_resend = sd_event_source_unref(client->timeout_resend); if (client->start_delay) { - sd_event_now(client->event, clock_boottime_or_monotonic(), &usec); + assert_se(sd_event_now(client->event, clock_boottime_or_monotonic(), &usec) >= 0); usec += client->start_delay; }