summaryrefslogtreecommitdiff
path: root/src/udev/udev-rules.c
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2012-04-16 03:13:22 +0200
committerKay Sievers <kay@vrfy.org>2012-04-16 19:20:57 +0200
commit8fef0ff25c9fd7e5bb99d66f43c6357e4996a3cc (patch)
tree8b570d9685b12ad1210c9ed857c18fa4e2e00913 /src/udev/udev-rules.c
parentb59e246565337d6c6967059dd15a52a15277433e (diff)
udev: replace ARRAY_SIZE() with ELEMENTSOF()
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;