crond: code shrink
function old new delta load_crontab 936 925 -11 Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@@ -512,13 +512,12 @@ static void load_crontab(const char *fileName)
|
|||||||
if (strcmp(e->name, tokens[0] + 1) == 0) {
|
if (strcmp(e->name, tokens[0] + 1) == 0) {
|
||||||
/*
|
/*
|
||||||
* tokens[1] is only the first word of command,
|
* tokens[1] is only the first word of command,
|
||||||
|
* can'r use it.
|
||||||
* find the entire command in unmodified string:
|
* find the entire command in unmodified string:
|
||||||
*/
|
*/
|
||||||
tokens[5] = strstr(
|
tokens[5] = skip_whitespace(
|
||||||
skip_non_whitespace(skip_whitespace(parser->data)),
|
skip_non_whitespace(
|
||||||
/* ^^^^ avoids mishandling e.g. "@daily aily PARAM" */
|
skip_whitespace(parser->data)));
|
||||||
tokens[1]
|
|
||||||
);
|
|
||||||
if (e->tokens[0]) {
|
if (e->tokens[0]) {
|
||||||
char *et = (char*)e->tokens;
|
char *et = (char*)e->tokens;
|
||||||
/* minute is "0" for all specials */
|
/* minute is "0" for all specials */
|
||||||
|
Reference in New Issue
Block a user