This commit is contained in:
Patricio Whittingslow
2026-08-24 16:55:10 -03:00
parent 52a3926428
commit 0860a6fe2e
+2 -2
View File
@@ -23,7 +23,7 @@ func newRetransmitQueue(t *testing.T, bufsize, maxPkts, npkt, pktlen, unsent int
} }
seq := iss seq := iss
scratch := make([]byte, pktlen) scratch := make([]byte, pktlen)
for i := 0; i < npkt; i++ { for i := range npkt {
n, err := rtx.MakePacket(scratch, seq) n, err := rtx.MakePacket(scratch, seq)
if err != nil { if err != nil {
t.Fatalf("packet %d: %v", i, err) t.Fatalf("packet %d: %v", i, err)
@@ -186,7 +186,7 @@ func TestRingTx_RetransmitWrapped(t *testing.T) {
// Push the queue most of the way around the ring, acking as we go. // Push the queue most of the way around the ring, acking as we go.
seq := iss seq := iss
scratch := make([]byte, pktlen) scratch := make([]byte, pktlen)
for round := 0; round < 3; round++ { for round := range 3 {
chunk := make([]byte, pktlen) chunk := make([]byte, pktlen)
for i := range chunk { for i := range chunk {
chunk[i] = byte(round*pktlen + i + 1) chunk[i] = byte(round*pktlen + i + 1)