Skip to content

Commit

Permalink
test: simplify for loop in test-buffer-zero-fill-cli.js
Browse files Browse the repository at this point in the history
PR-URL: #26799
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Signed-off-by: Beth Griggs <Bethany.Griggs@uk.ibm.com>
  • Loading branch information
juanarbol authored and BethGriggs committed Apr 9, 2019
1 parent dc9ce86 commit e5181f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/parallel/test-buffer-zero-fill-cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ const SlowBuffer = require('buffer').SlowBuffer;
const assert = require('assert');

function isZeroFilled(buf) {
for (let n = 0; n < buf.length; n++)
if (buf[n] > 0) return false;
for (const n of buf)
if (n > 0) return false;
return true;
}

Expand Down

0 comments on commit e5181f8

Please sign in to comment.