return 0;
}
+static usec_t client_timeout_compute_random(usec_t val) {
+ return usec_sub_unsigned(val, random_u64_range(val / 10));
+}
+
static int client_timeout_t2(sd_event_source *s, uint64_t usec, void *userdata) {
sd_dhcp6_client *client = userdata;
return 0;
}
-static usec_t client_timeout_compute_random(usec_t val) {
- return val - (random_u32() % USEC_PER_SEC) * val / 10 / USEC_PER_SEC;
-}
-
static int client_timeout_resend(sd_event_source *s, uint64_t usec, void *userdata) {
int r = 0;
sd_dhcp6_client *client = userdata;