From c346cca0b195576ecb8974518754b12f4527b145 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Fri, 14 Jun 2024 16:39:07 +0900 Subject: [PATCH] fix unnecesssary allocation in infile.go --- infile.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infile.go b/infile.go index 0c8af9f11..9b045fad2 100644 --- a/infile.go +++ b/infile.go @@ -149,7 +149,7 @@ func (mc *okHandler) handleInFileRequest(name string) (err error) { // send content packets // if packetSize == 0, the Reader contains no data if err == nil && packetSize > 0 { - data := make([]byte, 4+packetSize) + data = make([]byte, 4+packetSize) var n int for err == nil { n, err = rdr.Read(data[4:])