From 43a4589043faa6f81c2148e462e2b739e22ccb55 Mon Sep 17 00:00:00 2001 From: Matt Layher Date: Mon, 3 Jun 2019 16:25:32 -0400 Subject: [PATCH] device: remove redundant return statements More staticcheck fixes: $ staticcheck ./... | grep S1023 device/noise-helpers.go:45:2: redundant return statement (S1023) device/noise-helpers.go:54:2: redundant return statement (S1023) device/noise-helpers.go:64:2: redundant return statement (S1023) Signed-off-by: Matt Layher --- device/noise-helpers.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/device/noise-helpers.go b/device/noise-helpers.go index 03e6ec6..f5e4b4b 100644 --- a/device/noise-helpers.go +++ b/device/noise-helpers.go @@ -42,7 +42,6 @@ func HMAC2(sum *[blake2s.Size]byte, key, in0, in1 []byte) { func KDF1(t0 *[blake2s.Size]byte, key, input []byte) { HMAC1(t0, key, input) HMAC1(t0, t0[:], []byte{0x1}) - return } func KDF2(t0, t1 *[blake2s.Size]byte, key, input []byte) { @@ -51,7 +50,6 @@ func KDF2(t0, t1 *[blake2s.Size]byte, key, input []byte) { HMAC1(t0, prk[:], []byte{0x1}) HMAC2(t1, prk[:], t0[:], []byte{0x2}) setZero(prk[:]) - return } func KDF3(t0, t1, t2 *[blake2s.Size]byte, key, input []byte) { @@ -61,7 +59,6 @@ func KDF3(t0, t1, t2 *[blake2s.Size]byte, key, input []byte) { HMAC2(t1, prk[:], t0[:], []byte{0x2}) HMAC2(t2, prk[:], t1[:], []byte{0x3}) setZero(prk[:]) - return } func isZero(val []byte) bool {