mirror of
https://github.com/AuxXxilium/eudev.git
synced 2025-02-20 08:37:55 +07:00
udev: rules - modernise add_rule a bit
Signed-off-by: Anthony G. Basile <blueness@gentoo.org>
This commit is contained in:
parent
ed19623f62
commit
5cb9807847
@ -1047,11 +1047,11 @@ static int add_rule(struct udev_rules *rules, char *line,
|
||||
const char *filename, unsigned int filename_off, unsigned int lineno) {
|
||||
char *linepos;
|
||||
const char *attr;
|
||||
struct rule_tmp rule_tmp;
|
||||
struct rule_tmp rule_tmp = {
|
||||
.rules = rules,
|
||||
.rule.type = TK_RULE,
|
||||
};
|
||||
|
||||
memzero(&rule_tmp, sizeof(struct rule_tmp));
|
||||
rule_tmp.rules = rules;
|
||||
rule_tmp.rule.type = TK_RULE;
|
||||
/* the offset in the rule is limited to unsigned short */
|
||||
if (filename_off < USHRT_MAX)
|
||||
rule_tmp.rule.rule.filename_off = filename_off;
|
||||
|
Loading…
Reference in New Issue
Block a user