From 8d5142f03291c73937119209e9db1eb418dc26d4 Mon Sep 17 00:00:00 2001 From: David Hill Date: Tue, 10 Jun 2014 12:45:57 -0400 Subject: [PATCH] Don't assume the size of time_t. --- src/fe-common/core/fe-core-commands.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fe-common/core/fe-core-commands.c b/src/fe-common/core/fe-core-commands.c index 31a5ca9b..7b1d7b94 100644 --- a/src/fe-common/core/fe-core-commands.c +++ b/src/fe-common/core/fe-core-commands.c @@ -177,7 +177,7 @@ static void cmd_uptime(char *data) g_return_if_fail(data != NULL); if (*data == '\0') { - uptime = time(NULL) - client_start_time; + uptime = (long)difftime(time(NULL), client_start_time); printtext(NULL, NULL, MSGLEVEL_CLIENTNOTICE, "Uptime: %ldd %ldh %ldm %lds", uptime/3600/24, uptime/3600%24,