mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
sd-dhcp-client: avoid "maybe-uninitialized" warning in client_timeout_resend()
When compiling with CFLAGS='-Werror=maybe-uninitialized -Og' we get a
warning about uninitialized "next_timeout" variable.
Avoid the warning by adding an (unreachable) "default" label.
Fixes: c24288d21e
("sd-dhcp-client: correct dhcpv4 renew/rebind retransmit timeouts")
This commit is contained in:
parent
b945573303
commit
1835a8a105
@ -1275,6 +1275,9 @@ static int client_timeout_resend(
|
|||||||
case DHCP_STATE_STOPPED:
|
case DHCP_STATE_STOPPED:
|
||||||
r = -EINVAL;
|
r = -EINVAL;
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
|
default:
|
||||||
|
assert_not_reached("Unhandled choice");
|
||||||
}
|
}
|
||||||
|
|
||||||
r = event_reset_time(client->event, &client->timeout_resend,
|
r = event_reset_time(client->event, &client->timeout_resend,
|
||||||
|
Loading…
Reference in New Issue
Block a user