mirror of
https://github.com/systemd/systemd.git
synced 2026-08-08 00:51:19 +00:00
udev-rules: use new() macro instead of malloc_multiply()
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user