Let's cast these floats explicitly to usec_t, since implicit
float-to-integer casts are dangerous business, and we should underline
that there's a cast happening here.
* r_n : maximum restart usec (s->restart_max_delay_usec),
* i : index of the next step (n_restarts_next - 1)
* n : num maximum steps (s->restart_steps) */
- value = s->restart_usec * powl((long double) s->restart_max_delay_usec / s->restart_usec,
- (long double) (n_restarts_next - 1) / s->restart_steps);
+ value = (usec_t) (s->restart_usec * powl((long double) s->restart_max_delay_usec / s->restart_usec,
+ (long double) (n_restarts_next - 1) / s->restart_steps));
}
log_unit_debug(UNIT(s), "Next restart interval calculated as: %s", FORMAT_TIMESPAN(value, 0));