aboutsummaryrefslogtreecommitdiff
path: root/miscutils/crond.c
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2017-07-09 00:08:13 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2017-07-09 00:08:13 +0200
commitd18b2000967cddd0b84091d90a914aec58025310 (patch)
treeffd07e971d760888d14b8ca70803fe97a87150e2 /miscutils/crond.c
parent0b3b65fa91214d112581cfdd28526604b1399ece (diff)
downloadbusybox-d18b2000967cddd0b84091d90a914aec58025310.tar.gz
crond: code shrink
function old new delta load_crontab 936 925 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'miscutils/crond.c')
-rw-r--r--miscutils/crond.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index a472c9b23..c0c8bef11 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -512,13 +512,12 @@ static void load_crontab(const char *fileName)
if (strcmp(e->name, tokens[0] + 1) == 0) {
/*
* tokens[1] is only the first word of command,
+ * can'r use it.
* find the entire command in unmodified string:
*/
- tokens[5] = strstr(
- skip_non_whitespace(skip_whitespace(parser->data)),
- /* ^^^^ avoids mishandling e.g. "@daily aily PARAM" */
- tokens[1]
- );
+ tokens[5] = skip_whitespace(
+ skip_non_whitespace(
+ skip_whitespace(parser->data)));
if (e->tokens[0]) {
char *et = (char*)e->tokens;
/* minute is "0" for all specials */