daemon->control = NULL;
}
- INFO(daemon->ctx, "Will attempt to reconnect in %u second(s)\n",
+ INFO(daemon->ctx, "Will attempt to reconnect in %lu second(s)\n",
daemon->reconnect_holdoff / S_TO_US(1));
// Set the reconnection timer
// Time
// seconds to microseconds
-#define S_TO_MS(s) (s * 1000)
-#define S_TO_US(s) (s * 1000000)
-#define S_TO_NS(s) (s * 1000000000)
+#define S_TO_MS(s) ((s) * 1000UL)
+#define S_TO_US(s) ((s) * 1000000UL)
+#define S_TO_NS(s) ((s) * 1000000000UL)
-#define MS_TO_S(s) (s / 1000)
-#define US_TO_S(s) (s / 1000000)
-#define NS_TO_S(s) (s / 1000000000)
+#define MS_TO_S(s) ((s) / 1000)
+#define US_TO_S(s) ((s) / 1000000)
+#define NS_TO_S(s) ((s) / 1000000000)
-#define US_TO_MS(us) (us / 1000)
+#define US_TO_MS(us) ((us) / 1000)
static inline double pakfire_timespec_delta(struct timespec* t1, struct timespec* t2) {
// Compute delta in seconds