From 7d57599b9d9c5fb48ea733596cbb812d7f84a8d6 Mon Sep 17 00:00:00 2001 From: Veselkov Konstantin Date: Sat, 15 Sep 2018 21:23:36 +0400 Subject: fixed warnings gocritic 3.3 (#192) --- protect.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protect.go') diff --git a/protect.go b/protect.go index e934c2b..9a33534 100644 --- a/protect.go +++ b/protect.go @@ -68,8 +68,8 @@ func oValueGen(userPass, ownerPass []byte) (v []byte) { var c *rc4.Cipher tmp := md5.Sum(ownerPass) c, _ = rc4.NewCipher(tmp[0:5]) - cap := len(userPass) - v = make([]byte, cap, cap) + size := len(userPass) + v = make([]byte, size, size) c.XORKeyStream(v, userPass) return } @@ -77,8 +77,8 @@ func oValueGen(userPass, ownerPass []byte) (v []byte) { func (p *protectType) uValueGen() (v []byte) { var c *rc4.Cipher c, _ = rc4.NewCipher(p.encryptionKey) - cap := len(p.padding) - v = make([]byte, cap, cap) + size := len(p.padding) + v = make([]byte, size, size) c.XORKeyStream(v, p.padding) return } -- cgit v1.2.1-24-ge1ad