1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-24 21:34:08 +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)
return r;
m->enumerating = true;
for (sd_netlink_message *reply_one = reply; reply_one; reply_one = sd_netlink_message_next(reply_one)) {
m->enumerating = true;
k = process(nl, reply_one, m);
if (k < 0 && r >= 0)
r = k;
m->enumerating = false;
}
m->enumerating = false;
return r;
}