Skip to contentSkip to conversation

time: drop cast from NOW()

PATCH In review Jan Beulich 2 participants 2 messages Apr 3, 2025

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 time: drop cast from NOW()

It gives the wrong impression of there being a type change, when get_s_time() really returns s_time_t itself (kind of naturally given its name).

xen/include/xen/time.h +1 -1
@@ -53,7 +53,7 @@ struct tm gmtime(unsigned long t);
 struct tm wallclock_time(uint64_t *ns);
 
 #define SYSTEM_TIME_HZ  1000000000ULL
-#define NOW()           ((s_time_t)get_s_time())
+#define NOW()           get_s_time()
 #define DAYS(_d)        SECONDS((_d) * 86400ULL)
 #define SECONDS(_s)     ((s_time_t)((_s)  * 1000000000ULL))
 #define MILLISECS(_ms)  ((s_time_t)((_ms) * 1000000ULL))