summaryrefslogtreecommitdiff
path: root/miscutils/crond.c
diff options
context:
space:
mode:
authorDenis Vlasenko2007-06-25 10:55:35 +0000
committerDenis Vlasenko2007-06-25 10:55:35 +0000
commit80b8b39899a09c7516920cda5fd343b3086d4824 (patch)
treeaa9903fd6b64d19c5f640fa302272d85c92b204e /miscutils/crond.c
parent1399282b47bb218132a554cbe5b2b0ce4dcc055f (diff)
downloadbusybox-80b8b39899a09c7516920cda5fd343b3086d4824.zip
busybox-80b8b39899a09c7516920cda5fd343b3086d4824.tar.gz
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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/miscutils/crond.c b/miscutils/crond.c
index a490d41..5653f68 100644
--- a/miscutils/crond.c
+++ b/miscutils/crond.c
@@ -15,7 +15,6 @@
#include "libbb.h"
#include <sys/syslog.h>
-#define arysize(ary) (sizeof(ary)/sizeof((ary)[0]))
#ifndef CRONTABS
#define CRONTABS "/var/spool/cron/crontabs"
@@ -468,13 +467,13 @@ static void FixDayDow(CronLine * line)
int weekUsed = 0;
int daysUsed = 0;
- for (i = 0; i < (int)(arysize(line->cl_Dow)); ++i) {
+ for (i = 0; i < (int)(ARRAY_SIZE(line->cl_Dow)); ++i) {
if (line->cl_Dow[i] == 0) {
weekUsed = 1;
break;
}
}
- for (i = 0; i < (int)(arysize(line->cl_Days)); ++i) {
+ for (i = 0; i < (int)(ARRAY_SIZE(line->cl_Days)); ++i) {
if (line->cl_Days[i] == 0) {
daysUsed = 1;
break;