summaryrefslogtreecommitdiff
path: root/src/network/wait-online
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-08 11:58:29 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-09-08 12:14:05 +0200
commit90e74a66e663f1776457d599cb7d5ce44785a56c (patch)
tree16ce28594b8dc475e37df9a3b80accb96e748efa /src/network/wait-online
parent12375b95ddcb7dbbcbc5969b87822d39115d8acf (diff)
downloadsystemd-90e74a66e663f1776457d599cb7d5ce44785a56c.tar.gz
tree-wide: define iterator inside of the macro
Diffstat (limited to 'src/network/wait-online')
-rw-r--r--src/network/wait-online/manager.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/network/wait-online/manager.c b/src/network/wait-online/manager.c
index 6ab26d3ca9..e84eed46ac 100644
--- a/src/network/wait-online/manager.c
+++ b/src/network/wait-online/manager.c
@@ -66,7 +66,6 @@ static int manager_link_is_online(Manager *m, Link *l, LinkOperationalStateRange
bool manager_configured(Manager *m) {
bool one_ready = false;
- Iterator i;
const char *ifname;
void *p;
Link *l;
@@ -74,7 +73,7 @@ bool manager_configured(Manager *m) {
if (!hashmap_isempty(m->interfaces)) {
/* wait for all the links given on the command line to appear */
- HASHMAP_FOREACH_KEY(p, ifname, m->interfaces, i) {
+ HASHMAP_FOREACH_KEY(p, ifname, m->interfaces) {
LinkOperationalStateRange *range = p;
l = hashmap_get(m->links_by_name, ifname);
@@ -106,7 +105,7 @@ bool manager_configured(Manager *m) {
/* wait for all links networkd manages to be in admin state 'configured'
* and at least one link to gain a carrier */
- HASHMAP_FOREACH(l, m->links, i) {
+ HASHMAP_FOREACH(l, m->links) {
if (manager_ignore_link(m, l)) {
log_link_debug(l, "link is ignored");
continue;
@@ -255,7 +254,6 @@ static int manager_rtnl_listen(Manager *m) {
static int on_network_event(sd_event_source *s, int fd, uint32_t revents, void *userdata) {
Manager *m = userdata;
- Iterator i;
Link *l;
int r;
@@ -263,7 +261,7 @@ static int on_network_event(sd_event_source *s, int fd, uint32_t revents, void *
sd_network_monitor_flush(m->network_monitor);
- HASHMAP_FOREACH(l, m->links, i) {
+ HASHMAP_FOREACH(l, m->links) {
r = link_update_monitor(l);
if (r < 0 && r != -ENODATA)
log_link_warning_errno(l, r, "Failed to update link state, ignoring: %m");