diff options
Diffstat (limited to 'udev/udev-rules.c')
-rw-r--r-- | udev/udev-rules.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/udev/udev-rules.c b/udev/udev-rules.c index 2d120dd927..ccf1eaaf8f 100644 --- a/udev/udev-rules.c +++ b/udev/udev-rules.c @@ -1454,10 +1454,10 @@ static int add_rule(struct udev_rules *rules, char *line, uid = strtoul(value, &endptr, 10); if (endptr[0] == '\0') { rule_add_key(&rule_tmp, TK_A_OWNER_ID, op, NULL, &uid); - } else if (rules->resolve_names && strchr("$%", value[0]) == NULL) { + } else if ((rules->resolve_names > 0) && strchr("$%", value[0]) == NULL) { uid = add_uid(rules, value); rule_add_key(&rule_tmp, TK_A_OWNER_ID, op, NULL, &uid); - } else { + } else if (rules->resolve_names == 0) { rule_add_key(&rule_tmp, TK_A_OWNER, op, value, NULL); } rule_tmp.rule.rule.flags = 1; @@ -1472,10 +1472,10 @@ static int add_rule(struct udev_rules *rules, char *line, gid = strtoul(value, &endptr, 10); if (endptr[0] == '\0') { rule_add_key(&rule_tmp, TK_A_GROUP_ID, op, NULL, &gid); - } else if (rules->resolve_names && strchr("$%", value[0]) == NULL) { + } else if ((rules->resolve_names > 0) && strchr("$%", value[0]) == NULL) { gid = add_gid(rules, value); rule_add_key(&rule_tmp, TK_A_GROUP_ID, op, NULL, &gid); - } else { + } else if (rules->resolve_names == 0) { rule_add_key(&rule_tmp, TK_A_GROUP, op, value, NULL); } rule_tmp.rule.rule.flags = 1; |