]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
device: remove redundant return statements
authorMatt Layher <mdlayher@gmail.com>
Mon, 3 Jun 2019 20:25:32 +0000 (16:25 -0400)
committerJason A. Donenfeld <Jason@zx2c4.com>
Tue, 4 Jun 2019 11:01:52 +0000 (13:01 +0200)
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 <mdlayher@gmail.com>
device/noise-helpers.go

index 03e6ec68ad75c5fa224ae9d65616f679a712b53a..f5e4b4b7074565168d30a245911cf513092cd0c9 100644 (file)
@@ -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 {