diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-09-08 11:58:29 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2020-09-08 12:14:05 +0200 |
commit | 90e74a66e663f1776457d599cb7d5ce44785a56c (patch) | |
tree | 16ce28594b8dc475e37df9a3b80accb96e748efa /src/core/socket.c | |
parent | core/unit: reduce scope of variables (diff) | |
download | systemd-90e74a66e663f1776457d599cb7d5ce44785a56c.tar.xz systemd-90e74a66e663f1776457d599cb7d5ce44785a56c.zip |
tree-wide: define iterator inside of the macro
Diffstat (limited to 'src/core/socket.c')
-rw-r--r-- | src/core/socket.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/socket.c b/src/core/socket.c index 20c09b2a3f..855b354dd8 100644 --- a/src/core/socket.c +++ b/src/core/socket.c @@ -2338,12 +2338,11 @@ static void socket_enter_running(Socket *s, int cfd_in) { if (cfd < 0) { bool pending = false; Unit *other; - Iterator i; void *v; /* If there's already a start pending don't bother to * do anything */ - HASHMAP_FOREACH_KEY(v, other, UNIT(s)->dependencies[UNIT_TRIGGERS], i) + HASHMAP_FOREACH_KEY(v, other, UNIT(s)->dependencies[UNIT_TRIGGERS]) if (unit_active_or_pending(other)) { pending = true; break; @@ -2788,7 +2787,6 @@ static void socket_distribute_fds(Unit *u, FDSet *fds) { assert(u); LIST_FOREACH(port, p, s->ports) { - Iterator i; int fd; if (p->type != SOCKET_SOCKET) @@ -2797,7 +2795,7 @@ static void socket_distribute_fds(Unit *u, FDSet *fds) { if (p->fd >= 0) continue; - FDSET_FOREACH(fd, fds, i) { + FDSET_FOREACH(fd, fds) { if (socket_address_matches_fd(&p->address, fd)) { p->fd = fdset_remove(fds, fd); s->deserialized_state = SOCKET_LISTENING; |