summaryrefslogtreecommitdiff
path: root/miscutils
diff options
context:
space:
mode:
authorRob Landley2005-09-01 10:23:57 +0000
committerRob Landley2005-09-01 10:23:57 +0000
commit828548ab56ed2dca36daf0dfdbb0644119ecbe2c (patch)
treeef98f8bb5478276a0a5cb15d127ae79fba8f1dea /miscutils
parent344ea471ef63d54436f296c140e7f86c67237545 (diff)
downloadbusybox-828548ab56ed2dca36daf0dfdbb0644119ecbe2c.zip
busybox-828548ab56ed2dca36daf0dfdbb0644119ecbe2c.tar.gz
According to bug #63, crond is unhappy with crontab lines that don't end in a
newline, or lines that have trailing spaces.
Diffstat (limited to 'miscutils')
-rw-r--r--miscutils/crond.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index 085cf6e..53c255f 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -589,10 +589,8 @@ static void SynchronizeFile(const char *fileName)
CronLine line;
char *ptr;
- if (buf[0]) {
- buf[strlen(buf) - 1] = 0;
- }
- if (buf[0] == 0 || buf[0] == '#' || buf[0] == ' ' || buf[0] == '\t') {
+ trim(buf);
+ if (buf[0] == 0 || buf[0] == '#') {
continue;
}
if (--maxEntries == 0) {