aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/tools/showconf.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2017-10-25 17:13:46 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2017-10-31 17:25:23 +0100
commit7491cd4c22601eb0c3bedfea740f2aec3b8372ed (patch)
treee5b8c3adf9e17e9abf3c028ea163ee7840659826 /src/tools/showconf.c
parentpeer: store total number of peers instead of iterating (diff)
downloadwireguard-monolithic-historical-7491cd4c22601eb0c3bedfea740f2aec3b8372ed.tar.xz
wireguard-monolithic-historical-7491cd4c22601eb0c3bedfea740f2aec3b8372ed.zip
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.
Diffstat (limited to 'src/tools/showconf.c')
-rw-r--r--src/tools/showconf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/showconf.c b/src/tools/showconf.c
index 51f9a6f..adc3789 100644
--- a/src/tools/showconf.c
+++ b/src/tools/showconf.c
@@ -43,7 +43,7 @@ int showconf_main(int argc, char *argv[])
printf("PrivateKey = %s\n", base64);
}
printf("\n");
- for_each_wgpeer (device, peer) {
+ for_each_wgpeer(device, peer) {
key_to_base64(base64, peer->public_key);
printf("[Peer]\nPublicKey = %s\n", base64);
if (!key_is_zero(peer->preshared_key)) {
@@ -52,7 +52,7 @@ int showconf_main(int argc, char *argv[])
}
if (peer->first_allowedip)
printf("AllowedIPs = ");
- 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;