summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2010-06-16 15:16:56 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2010-06-16 15:16:56 +0200
commitd1ace288013b67c7809d582a7364430aa605ab71 (patch)
tree6ab0446073d7cef900739637a7b8728d65f5bc0c
parent774dfcd6100f1c3346a2180f15562891870db611 (diff)
downloadabrt-d1ace288013b67c7809d582a7364430aa605ab71.tar.gz
abrt-d1ace288013b67c7809d582a7364430aa605ab71.tar.xz
abrt-d1ace288013b67c7809d582a7364430aa605ab71.zip
move misplaced sanity checks in cron parser
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--src/Daemon/Daemon.cpp4
1 files 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