summaryrefslogtreecommitdiff
path: root/src/udev/udev-rules.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/udev/udev-rules.c')
-rw-r--r--src/udev/udev-rules.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index 4e85760bd4..55d7e30c02 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -1131,7 +1131,7 @@ static int rule_add_key(struct rule_tmp *rule_tmp, enum token_type type,
token->key.type = type;
token->key.op = op;
rule_tmp->token_cur++;
- if (rule_tmp->token_cur >= ARRAY_SIZE(rule_tmp->token)) {
+ if (rule_tmp->token_cur >= ELEMENTSOF(rule_tmp->token)) {
log_error("temporary rule array too small\n");
return -1;
}
@@ -1344,7 +1344,7 @@ static int add_rule(struct udev_rules *rules, char *line,
};
unsigned int i;
- for (i = 0; i < ARRAY_SIZE(blacklist); i++)
+ for (i = 0; i < ELEMENTSOF(blacklist); i++)
if (strcmp(attr, blacklist[i]) == 0) {
log_error("invalid ENV attribute, '%s' can not be set %s:%u\n", attr, filename, lineno);
continue;