From a579c969e62a4727b4173b31ed54d338dbe1a4db Mon Sep 17 00:00:00 2001 From: David Fifield Date: Thu, 22 Sep 2022 16:52:51 -0600 Subject: [PATCH] encapsulation.paddingBuffer can be statically allocated. --- common/encapsulation/encapsulation.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/encapsulation/encapsulation.go b/common/encapsulation/encapsulation.go index aee6a56..15fbe40 100644 --- a/common/encapsulation/encapsulation.go +++ b/common/encapsulation/encapsulation.go @@ -138,7 +138,7 @@ func WriteData(w io.Writer, data []byte) (int, error) { return total, err } -var paddingBuffer = make([]byte, 1024) +var paddingBuffer [1024]byte // WritePadding encodes padding chunks, whose total size (including their own // length prefixes) is n. Returns the total number of bytes written to w, which