]> xenbits.xensource.com Git - xen.git/commitdiff
time: drop cast from NOW()
authorJan Beulich <jbeulich@suse.com>
Mon, 7 Apr 2025 10:17:06 +0000 (12:17 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 7 Apr 2025 10:17:06 +0000 (12:17 +0200)
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).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
xen/include/xen/time.h

index 21e479aac896d68b29adc89f7d6eb2756dab3d14..fe0d7a578a998b055a5ede1ab7732ce9b3e447af 100644 (file)
@@ -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))