From: Vsevolod Stakhov Date: Fri, 27 Mar 2009 16:43:53 +0000 (+0300) Subject: * Another fix of uptime command X-Git-Tag: 0.2.7~215 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7c2d28229775bf2aeb381618122296e362435986;p=thirdparty%2Frspamd.git * Another fix of uptime command --- diff --git a/src/controller.c b/src/controller.c index 5a444b2757..a2c373d25c 100644 --- a/src/controller.c +++ b/src/controller.c @@ -222,8 +222,8 @@ process_command (struct controller_command *cmd, char **cmd_args, struct control /* If uptime more than 2 hours, print as a number of days. */ if (uptime >= 2 * 3600) { days = uptime / 86400; - hours = uptime / 3600 - days * 86400; - minutes = uptime / 60 - hours * 3600 - days * 86400; + hours = uptime / 3600 - days * 3600; + minutes = uptime / 60 - hours * 60 - days * 3600; r = snprintf (out_buf, sizeof (out_buf), "%d day%s %d hour%s %d minute%s" CRLF, days, days > 1 ? "s" : " ", hours, hours > 1 ? "s" : " ",