Commit 17eb0f2a authored by william's avatar william

fix typing bugs in fp conversion macros

parent 55878c07
...@@ -203,10 +203,10 @@ TIMEOUT_PUBLIC bool timeouts_check(struct timeouts *, FILE *); ...@@ -203,10 +203,10 @@ TIMEOUT_PUBLIC bool timeouts_check(struct timeouts *, FILE *);
#include <math.h> /* ceil(3) */ #include <math.h> /* ceil(3) */
#define timeouts_f2i(T, f) \ #define timeouts_f2i(T, f) \
(ceil((f) * timeouts_hz((T)))) /* prefer late expiration over early */ ((timeout_t)ceil((f) * timeouts_hz((T)))) /* prefer late expiration over early */
#define timeouts_i2f(T, i) \ #define timeouts_i2f(T, i) \
((i) / timeouts_hz((T))) ((double)(i) / timeouts_hz((T)))
#define timeouts_addf(T, to, timeout) \ #define timeouts_addf(T, to, timeout) \
timeouts_add((T), (to), timeouts_f2i((T), (timeout))) timeouts_add((T), (to), timeouts_f2i((T), (timeout)))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment