mirror of
https://github.com/systemd/systemd.git
synced 2024-10-27 01:55:22 +03:00
core/unit: use FOREACH_ARRAY at one more place
This commit is contained in:
parent
8959e17d73
commit
5e7022033f
@ -1249,10 +1249,10 @@ int unit_add_exec_dependencies(Unit *u, ExecContext *c) {
|
|||||||
if (!u->manager->prefix[dt])
|
if (!u->manager->prefix[dt])
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
for (size_t i = 0; i < c->directories[dt].n_items; i++) {
|
FOREACH_ARRAY(i, c->directories[dt].items, c->directories[dt].n_items) {
|
||||||
_cleanup_free_ char *p = NULL;
|
_cleanup_free_ char *p = NULL;
|
||||||
|
|
||||||
p = path_join(u->manager->prefix[dt], c->directories[dt].items[i].path);
|
p = path_join(u->manager->prefix[dt], i->path);
|
||||||
if (!p)
|
if (!p)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user