udev-rules: use new() macro instead of malloc_multiply()

This commit is contained in:
Yu Watanabe 2019-02-18 10:41:48 +09:00
parent 1e797cf596
commit 145e020ac3

View file

@ -1584,7 +1584,7 @@ int udev_rules_new(UdevRules **ret_rules, ResolveNameTiming resolve_name_timing)
};
/* init token array and string buffer */
rules->tokens = malloc_multiply(PREALLOC_TOKEN, sizeof(struct token));
rules->tokens = new(struct token, PREALLOC_TOKEN);
if (!rules->tokens)
return -ENOMEM;
rules->token_max = PREALLOC_TOKEN;