Correct previous commit

This commit is contained in:
Raul Silvera 2019-01-18 11:05:34 -08:00
parent 30c8e68cef
commit 7c04f12603

View file

@ -111,12 +111,12 @@ func testSmallAllocations() error {
allocSmall1(iters) allocSmall1(iters)
if checkAllocations(getMemProfileRecords(), frames[0:1], iters, sizes) == nil { if checkAllocations(getMemProfileRecords(), frames[0:1], iters, sizes) == nil {
// Passed on first try, report no error. // Passed on first try, report no error.
return err return nil
} }
allocSmall2(iters) allocSmall2(iters)
if checkAllocations(getMemProfileRecords(), frames[0:2], iters, sizes) == nil { if checkAllocations(getMemProfileRecords(), frames[0:2], iters, sizes) == nil {
// Passed on second try, report no error. // Passed on second try, report no error.
return err return nil
} }
allocSmall3(iters) allocSmall3(iters)
// If it fails a third time, we may be onto something. // If it fails a third time, we may be onto something.