1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-25 23:21:33 +03:00

network: set/unset enumerating flag before/after loop

This commit is contained in:
Yu Watanabe 2022-05-09 16:30:36 +09:00
parent 2aaf6d407e
commit a6b084234c

View File

@ -667,15 +667,13 @@ static int manager_enumerate_internal(
if (r < 0) if (r < 0)
return r; return r;
for (sd_netlink_message *reply_one = reply; reply_one; reply_one = sd_netlink_message_next(reply_one)) {
m->enumerating = true; m->enumerating = true;
for (sd_netlink_message *reply_one = reply; reply_one; reply_one = sd_netlink_message_next(reply_one)) {
k = process(nl, reply_one, m); k = process(nl, reply_one, m);
if (k < 0 && r >= 0) if (k < 0 && r >= 0)
r = k; r = k;
m->enumerating = false;
} }
m->enumerating = false;
return r; return r;
} }