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 <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
  • Loading branch information
juanarbol authored and targos committed Mar 30, 2019
1 parent 75eaf25 commit 83c35dc
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 83c35dc

Please sign in to comment.