ax(ueps): remove superfluous payloadBytes intermediate variable
payload was declared via var at the top of ReadAndVerify; the inner payloadBytes := io.ReadAll + payload = payloadBytes pattern introduced an unnecessary name that added no semantic value. Assign directly to the outer payload variable instead. Co-Authored-By: Charon <charon@lethean.io>
This commit is contained in:
parent
df8f17c1cb
commit
64af8eb468
1 changed files with 2 additions and 2 deletions
|
|
@ -44,11 +44,11 @@ func ReadAndVerify(reader *bufio.Reader, sharedSecret []byte) (*ParsedPacket, er
|
|||
if tagByte == TagPayload {
|
||||
// Payload is length-prefixless; caller frames the stream.
|
||||
// HMAC covers signedData (header TLVs) + raw payload bytes, not the 0xFF tag.
|
||||
payloadBytes, err := io.ReadAll(reader)
|
||||
var err error
|
||||
payload, err = io.ReadAll(reader)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
payload = payloadBytes
|
||||
break
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue