Skip to content

Commit

Permalink
fix unnecesssary allocation in infile.go
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Jun 14, 2024
1 parent 87443b9 commit c346cca
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion infile.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:])
Expand Down

0 comments on commit c346cca

Please sign in to comment.