diff --git a/src/tool_util.c b/src/tool_util.c index a7535dbefd..27c95685a4 100644 --- a/src/tool_util.c +++ b/src/tool_util.c @@ -86,7 +86,7 @@ struct timeval tvnow(void) (void)gettimeofday(&now, NULL); #else else { - now.tv_sec = (long)time(NULL); + now.tv_sec = time(NULL); now.tv_usec = 0; } #endif @@ -115,7 +115,7 @@ struct timeval tvnow(void) ** time() returns the value of time in seconds since the Epoch. */ struct timeval now; - now.tv_sec = (long)time(NULL); + now.tv_sec = time(NULL); now.tv_usec = 0; return now; } diff --git a/tests/libtest/testutil.c b/tests/libtest/testutil.c index 5c0dd9ef41..5bf6a93041 100644 --- a/tests/libtest/testutil.c +++ b/tests/libtest/testutil.c @@ -67,7 +67,7 @@ struct timeval tutil_tvnow(void) (void)gettimeofday(&now, NULL); #else else { - now.tv_sec = (long)time(NULL); + now.tv_sec = time(NULL); now.tv_usec = 0; } #endif @@ -96,7 +96,7 @@ struct timeval tutil_tvnow(void) ** time() returns the value of time in seconds since the Epoch. */ struct timeval now; - now.tv_sec = (long)time(NULL); + now.tv_sec = time(NULL); now.tv_usec = 0; return now; } diff --git a/tests/server/util.c b/tests/server/util.c index 284f347cfd..81e705c152 100644 --- a/tests/server/util.c +++ b/tests/server/util.c @@ -496,7 +496,7 @@ static struct timeval tvnow(void) (void)gettimeofday(&now, NULL); #else else { - now.tv_sec = (long)time(NULL); + now.tv_sec = time(NULL); now.tv_usec = 0; } #endif @@ -525,7 +525,7 @@ static struct timeval tvnow(void) ** time() returns the value of time in seconds since the Epoch. */ struct timeval now; - now.tv_sec = (long)time(NULL); + now.tv_sec = time(NULL); now.tv_usec = 0; return now; }