aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/cookie.c
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2016-11-05 23:31:13 +0100
committerJason A. Donenfeld <Jason@zx2c4.com>2016-11-05 23:37:31 +0100
commit3a56fc6a0719d3e9003f8f8faceb95c678ec9c1c (patch)
treefc21d970a2b56d9b964ae5a0ea6159053a156c45 /src/cookie.c
parenttools: chill modern gcc out (diff)
downloadwireguard-monolithic-historical-3a56fc6a0719d3e9003f8f8faceb95c678ec9c1c.tar.xz
wireguard-monolithic-historical-3a56fc6a0719d3e9003f8f8faceb95c678ec9c1c.zip
c89: the static keyword is okay in c99, but not in c89
Diffstat (limited to 'src/cookie.c')
-rw-r--r--src/cookie.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cookie.c b/src/cookie.c
index e8cf55b..8d66457 100644
--- a/src/cookie.c
+++ b/src/cookie.c
@@ -34,7 +34,7 @@ void cookie_init(struct cookie *cookie)
init_rwsem(&cookie->lock);
}
-static void compute_mac1(u8 mac1[static COOKIE_LEN], const void *message, size_t len, const u8 pubkey[static NOISE_PUBLIC_KEY_LEN], const u8 psk[static NOISE_SYMMETRIC_KEY_LEN])
+static void compute_mac1(u8 mac1[COOKIE_LEN], const void *message, size_t len, const u8 pubkey[NOISE_PUBLIC_KEY_LEN], const u8 psk[NOISE_SYMMETRIC_KEY_LEN])
{
struct blake2s_state state;
len = len - sizeof(struct message_macs) + offsetof(struct message_macs, mac1);
@@ -48,7 +48,7 @@ static void compute_mac1(u8 mac1[static COOKIE_LEN], const void *message, size_t
blake2s_final(&state, mac1, COOKIE_LEN);
}
-static void compute_mac2(u8 mac2[static COOKIE_LEN], const void *message, size_t len, const u8 cookie[static COOKIE_LEN])
+static void compute_mac2(u8 mac2[COOKIE_LEN], const void *message, size_t len, const u8 cookie[COOKIE_LEN])
{
len = len - sizeof(struct message_macs) + offsetof(struct message_macs, mac2);
blake2s(mac2, message, cookie, COOKIE_LEN, len, COOKIE_LEN);
@@ -71,7 +71,7 @@ static inline void put_secret(struct cookie_checker *checker)
up_read(&checker->secret_lock);
}
-static void make_cookie(u8 cookie[static COOKIE_LEN], struct sk_buff *skb, struct cookie_checker *checker)
+static void make_cookie(u8 cookie[COOKIE_LEN], struct sk_buff *skb, struct cookie_checker *checker)
{
struct blake2s_state state;
const u8 *secret;