summaryrefslogtreecommitdiffstats
path: root/src/controller.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-27 19:43:53 +0300
committerVsevolod Stakhov <vsevolod@rambler-co.ru>2009-03-27 19:43:53 +0300
commit7c2d28229775bf2aeb381618122296e362435986 (patch)
tree4f9e835e49066f5abd2f001717aafdde20088e2b /src/controller.c
parent182b158dc85acb9a3de38bc11eb09feff991cf11 (diff)
downloadrspamd-7c2d28229775bf2aeb381618122296e362435986.tar.gz
rspamd-7c2d28229775bf2aeb381618122296e362435986.zip
* Another fix of uptime command
Diffstat (limited to 'src/controller.c')
-rw-r--r--src/controller.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/controller.c b/src/controller.c
index 5a444b275..a2c373d25 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" : " ",