diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-25 10:55:35 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-06-25 10:55:35 +0000 |
commit | 80b8b39899a09c7516920cda5fd343b3086d4824 (patch) | |
tree | aa9903fd6b64d19c5f640fa302272d85c92b204e /miscutils/crond.c | |
parent | 1399282b47bb218132a554cbe5b2b0ce4dcc055f (diff) | |
download | busybox-w32-80b8b39899a09c7516920cda5fd343b3086d4824.tar.gz busybox-w32-80b8b39899a09c7516920cda5fd343b3086d4824.tar.bz2 busybox-w32-80b8b39899a09c7516920cda5fd343b3086d4824.zip |
Consolidate ARRAY_SIZE macro; remove one unneeded global var (walter harms <wharms@bfs.de>)
Diffstat (limited to 'miscutils/crond.c')
-rw-r--r-- | miscutils/crond.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c index a490d417f..5653f6804 100644 --- a/miscutils/crond.c +++ b/miscutils/crond.c | |||
@@ -15,7 +15,6 @@ | |||
15 | #include "libbb.h" | 15 | #include "libbb.h" |
16 | #include <sys/syslog.h> | 16 | #include <sys/syslog.h> |
17 | 17 | ||
18 | #define arysize(ary) (sizeof(ary)/sizeof((ary)[0])) | ||
19 | 18 | ||
20 | #ifndef CRONTABS | 19 | #ifndef CRONTABS |
21 | #define CRONTABS "/var/spool/cron/crontabs" | 20 | #define CRONTABS "/var/spool/cron/crontabs" |
@@ -468,13 +467,13 @@ static void FixDayDow(CronLine * line) | |||
468 | int weekUsed = 0; | 467 | int weekUsed = 0; |
469 | int daysUsed = 0; | 468 | int daysUsed = 0; |
470 | 469 | ||
471 | for (i = 0; i < (int)(arysize(line->cl_Dow)); ++i) { | 470 | for (i = 0; i < (int)(ARRAY_SIZE(line->cl_Dow)); ++i) { |
472 | if (line->cl_Dow[i] == 0) { | 471 | if (line->cl_Dow[i] == 0) { |
473 | weekUsed = 1; | 472 | weekUsed = 1; |
474 | break; | 473 | break; |
475 | } | 474 | } |
476 | } | 475 | } |
477 | for (i = 0; i < (int)(arysize(line->cl_Days)); ++i) { | 476 | for (i = 0; i < (int)(ARRAY_SIZE(line->cl_Days)); ++i) { |
478 | if (line->cl_Days[i] == 0) { | 477 | if (line->cl_Days[i] == 0) { |
479 | daysUsed = 1; | 478 | daysUsed = 1; |
480 | break; | 479 | break; |