diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-09-21 12:56:37 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2023-09-22 08:17:42 +0200 |
commit | f75921c7fd36be2139cae921bd6510c8a33182c1 (patch) | |
tree | 8a162de11988734925d14bce2c856948b71ee5e9 /src/network/netdev/wireguard.c | |
parent | network: make DEFINE_NETDEV_CAST() assert on input and output (diff) | |
download | systemd-f75921c7fd36be2139cae921bd6510c8a33182c1.tar.xz systemd-f75921c7fd36be2139cae921bd6510c8a33182c1.zip |
netdev/wireguard: define iterator variable in the loop
Diffstat (limited to '')
-rw-r--r-- | src/network/netdev/wireguard.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/network/netdev/wireguard.c b/src/network/netdev/wireguard.c index 14f664e983..c89577609d 100644 --- a/src/network/netdev/wireguard.c +++ b/src/network/netdev/wireguard.c @@ -225,13 +225,12 @@ cancel: static int wireguard_set_interface(NetDev *netdev) { _cleanup_(sd_netlink_message_unrefp) sd_netlink_message *message = NULL; WireguardIPmask *mask_start = NULL; - WireguardPeer *peer_start; bool sent_once = false; uint32_t serial; Wireguard *w = WIREGUARD(netdev); int r; - for (peer_start = w->peers; peer_start || !sent_once; ) { + for (WireguardPeer *peer_start = w->peers; peer_start || !sent_once; ) { uint16_t i = 0; message = sd_netlink_message_unref(message); |