From d9d0a2cbed18e44dee398128007ac8b7b9f7a16a Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Wed, 25 Oct 2017 17:13:46 +0200 Subject: 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 --- src/ipc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ipc.c') diff --git a/src/ipc.c b/src/ipc.c index 72bbd38..66a5720 100644 --- a/src/ipc.c +++ b/src/ipc.c @@ -227,7 +227,7 @@ static int userspace_set_device(struct wgdevice *dev) if (dev->flags & WGDEVICE_REPLACE_PEERS) fprintf(f, "replace_peers=true\n"); - for_each_wgpeer (dev, peer) { + for_each_wgpeer(dev, peer) { key_to_hex(hex, peer->public_key); fprintf(f, "public_key=%s\n", hex); if (peer->flags & WGPEER_REMOVE_ME) { @@ -255,7 +255,7 @@ static int userspace_set_device(struct wgdevice *dev) fprintf(f, "persistent_keepalive_interval=%u\n", peer->persistent_keepalive_interval); if (peer->flags & WGPEER_REPLACE_ALLOWEDIPS) fprintf(f, "replace_allowed_ips=true\n"); - for_each_wgallowedip (peer, allowedip) { + for_each_wgallowedip(peer, allowedip) { if (allowedip->family == AF_INET) { if (!inet_ntop(AF_INET, &allowedip->ip4, ip, INET6_ADDRSTRLEN)) continue; -- cgit v1.2.3-59-g8ed1b