From d1ace288013b67c7809d582a7364430aa605ab71 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 16 Jun 2010 15:16:56 +0200 Subject: move misplaced sanity checks in cron parser Signed-off-by: Denys Vlasenko --- src/Daemon/Daemon.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Daemon/Daemon.cpp b/src/Daemon/Daemon.cpp index d79d90a4..331de4cf 100644 --- a/src/Daemon/Daemon.cpp +++ b/src/Daemon/Daemon.cpp @@ -207,11 +207,11 @@ static int SetUpCron() nH = xatou(sH.c_str()); nH = nH > 23 ? 23 : nH; nH = nH < 0 ? 0 : nH; - nM = nM > 59 ? 59 : nM; - nM = nM < 0 ? 0 : nM; timeout += nH * 60 * 60; sM = it_c->first.substr(pos + 1); nM = xatou(sM.c_str()); + nM = nM > 59 ? 59 : nM; + nM = nM < 0 ? 0 : nM; timeout += nM * 60; } else -- cgit