diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-25 17:13:46 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2017-10-31 17:25:23 +0100 |
commit | 336c7135b81dd4c458bb508b0e85d422e748fd15 (patch) | |
tree | 130b1723f6812fab06b57dd93975089146edd020 /src/device.c | |
parent | 2a221ee32e7fa17b1dd983f520768ff455603912 (diff) |
global: infuriating kernel iterator style
One types:
for (i = 0 ...
So one should also type:
for_each_obj (obj ...
But the upstream kernel style guidelines are insane, and so we must
instead do:
for_each_obj(obj ...
Ugly, but one must choose his battles wisely.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/device.c')
-rw-r--r-- | src/device.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/device.c b/src/device.c index cf6e2b2..8a2eb0a 100644 --- a/src/device.c +++ b/src/device.c @@ -54,7 +54,7 @@ static int open(struct net_device *dev) if (ret < 0) return ret; mutex_lock(&wg->device_update_lock); - list_for_each_entry (peer, &wg->peer_list, peer_list) { + list_for_each_entry(peer, &wg->peer_list, peer_list) { packet_send_staged_packets(peer); if (peer->persistent_keepalive_interval) packet_send_keepalive(peer); @@ -73,9 +73,9 @@ static int suspending_clear_noise_peers(struct notifier_block *nb, unsigned long return 0; rtnl_lock(); - list_for_each_entry (wg, &device_list, device_list) { + list_for_each_entry(wg, &device_list, device_list) { mutex_lock(&wg->device_update_lock); - list_for_each_entry (peer, &wg->peer_list, peer_list) { + list_for_each_entry(peer, &wg->peer_list, peer_list) { noise_handshake_clear(&peer->handshake); noise_keypairs_clear(&peer->keypairs); if (peer->timers_enabled) @@ -96,7 +96,7 @@ static int stop(struct net_device *dev) struct wireguard_peer *peer; mutex_lock(&wg->device_update_lock); - list_for_each_entry (peer, &wg->peer_list, peer_list) { + list_for_each_entry(peer, &wg->peer_list, peer_list) { skb_queue_purge(&peer->staged_packet_queue); timers_stop(peer); noise_handshake_clear(&peer->handshake); |