summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
60ad0c8)
Some DHCP servers will not work correctly if secs == 0, so round up
to at least 1.
static uint16_t client_update_secs(sd_dhcp_client *client, usec_t time_now)
{
static uint16_t client_update_secs(sd_dhcp_client *client, usec_t time_now)
{
- client->secs = (time_now - client->start_time) / USEC_PER_SEC;
+ client->secs = ((time_now - client->start_time) / USEC_PER_SEC) ? : 1;