]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
dhcp: assert the success of sd_event_now() 2620/head
authorBeniamino Galvani <bgalvani@redhat.com>
Mon, 15 Feb 2016 15:11:51 +0000 (16:11 +0100)
committerBeniamino Galvani <bgalvani@redhat.com>
Mon, 15 Feb 2016 15:20:55 +0000 (16:20 +0100)
The function must never fail.

src/libsystemd-network/sd-dhcp-client.c

index cad1a52c098e617af9133a211ed75eed3aee6c82..5fd59f7dd3962239fcfe71025705d48bc3fc5049 100644 (file)
@@ -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;
         }