1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-25 10:04:04 +03:00

install: use FOREACH_ARRAY

This commit is contained in:
David Tardon 2023-04-14 10:21:17 +02:00
parent 05cdf6a701
commit f52477d611

View File

@ -89,8 +89,8 @@ void unit_file_presets_done(UnitFilePresets *p) {
if (!p)
return;
for (size_t i = 0; i < p->n_rules; i++)
unit_file_preset_rule_done(&p->rules[i]);
FOREACH_ARRAY(rule, p->rules, p->n_rules)
unit_file_preset_rule_done(rule);
free(p->rules);
p->n_rules = 0;