scron

simple cron daemon
git clone git://git.2f30.org/scron
Log | Files | Refs | README | LICENSE

commit 9ea4e3d81d05441ca23bb3a9074f1ffba8e7706d
parent 8417994789a1aaa04205cdaa1fdc280a8501309e
Author: sin <sin@2f30.org>
Date:   Sat,  5 Jul 2014 16:46:19 +0100

If * is not followed by / then that's an error

We handle * followed by a null-terminator as early as possible.

Diffstat:
Mcrond.c | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/crond.c b/crond.c @@ -199,14 +199,14 @@ parsefield(const char *field, long low, long high, struct field *f) break; case '*': e1++; - if (e1[0] == '/') { - e1++; - errno = 0; - div = strtol(e1, &e2, 10); - if (e2[0] != '\0' || errno != 0) - return -1; - break; - } + if (e1[0] != '/') + return -1; + e1++; + errno = 0; + div = strtol(e1, &e2, 10); + if (e2[0] != '\0' || errno != 0) + return -1; + break; case '\0': break; default: