From 50226ef63cf3d70e3bf57558e54acaffa6b12727 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 29 Apr 2019 20:48:30 +0800 Subject: [PATCH] include/utime: do not cast sec to time_t strictly speaking, time_t is an opaque time, and in this context, we need a uint32_t, so it is not necessary and wrong. let's remove it. Signed-off-by: Kefu Chai --- src/include/utime.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/utime.h b/src/include/utime.h index f2f88b55e0c8..019eb7143a72 100644 --- a/src/include/utime.h +++ b/src/include/utime.h @@ -83,8 +83,8 @@ public: #if defined(WITH_SEASTAR) explicit utime_t(const seastar::lowres_system_clock::time_point& t) { - tv.tv_sec = std::time_t(std::chrono::duration_cast( - t.time_since_epoch()).count()); + tv.tv_sec = std::chrono::duration_cast( + t.time_since_epoch()).count(); tv.tv_nsec = std::chrono::duration_cast( t.time_since_epoch() % std::chrono::seconds(1)).count(); } -- 2.47.3