summaryrefslogtreecommitdiffhomepage
path: root/src/main.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-12-13 03:32:00 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2016-12-16 06:35:58 +0100
commit746e4b86eba7cd89d23a3e89b8979b795b9a4a65 (patch)
treeed0feb3589f1f301df795f864550f3adfb7ceba8 /src/main.c
parentb40dc5be9739c362329ab5741886447b9a1fdf44 (diff)
types: enforce consistency
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/main.c b/src/main.c
index e27e619..e0e2bb0 100644
--- a/src/main.c
+++ b/src/main.c
@@ -16,7 +16,7 @@
static int __init mod_init(void)
{
- int err;
+ int ret;
#ifdef DEBUG
if (!routing_table_selftest() || !packet_counter_selftest() || !curve25519_selftest() || !chacha20poly1305_selftest() || !blake2s_selftest() || !siphash24_selftest())
@@ -25,18 +25,18 @@ static int __init mod_init(void)
chacha20poly1305_init();
noise_init();
- err = ratelimiter_module_init();
- if (err < 0)
- return err;
+ ret = ratelimiter_module_init();
+ if (ret < 0)
+ return ret;
#ifdef CONFIG_WIREGUARD_PARALLEL
- err = packet_init_data_caches();
- if (err < 0)
+ ret = packet_init_data_caches();
+ if (ret < 0)
goto err_packet;
#endif
- err = device_init();
- if (err < 0)
+ ret = device_init();
+ if (ret < 0)
goto err_device;
pr_info("WireGuard " WIREGUARD_VERSION " loaded. See www.wireguard.io for information.\n");
@@ -50,7 +50,7 @@ err_device:
err_packet:
#endif
ratelimiter_module_deinit();
- return err;
+ return ret;
}
static void __exit mod_exit(void)