From: Martin Schwenke Date: Tue, 11 Oct 2022 22:05:25 +0000 (+1100) Subject: ctdb-recoverd: CID 1509028 - Use of 32-bit time_t (Y2K38_SAFETY) X-Git-Tag: ldb-2.8.0~114 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2e2d81b92a98f97f404f536368178de3c1bfb284;p=thirdparty%2Fsamba.git ctdb-recoverd: CID 1509028 - Use of 32-bit time_t (Y2K38_SAFETY) usecs is going to be passed as a uint32_t. There is no need to calculate it as a time_t. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c index 893af8f1f4f..040cbffe953 100644 --- a/ctdb/server/ctdb_recoverd.c +++ b/ctdb/server/ctdb_recoverd.c @@ -619,7 +619,7 @@ static void ctdb_wait_handler(struct tevent_context *ev, static void ctdb_wait_timeout(struct ctdb_context *ctdb, double secs) { uint32_t timed_out = 0; - time_t usecs = (secs - (time_t)secs) * 1000000; + uint32_t usecs = (secs - (uint32_t)secs) * 1000000; tevent_add_timer(ctdb->ev, ctdb, timeval_current_ofs(secs, usecs), ctdb_wait_handler, &timed_out); while (!timed_out) {