Skip to content

Commit

Permalink
fs: remove needless assignment of null
Browse files Browse the repository at this point in the history
This line `pool = null;` isn't needed and has
been around since the first iteration of streams.
I can't find a good reason for it to exist, it's
not more readable, nor does it seem to trick the
compiler into any optimizations.

PR-URL: #10260
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Italo A. Casas <[email protected]>
  • Loading branch information
reconbot authored and MylesBorins committed Jan 24, 2017
1 parent 6ad8a6e commit c846184
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion lib/fs.js
Original file line number Diff line number Diff line change
Expand Up @@ -1961,7 +1961,6 @@ ReadStream.prototype._read = function(n) {

if (!pool || pool.length - pool.used < kMinPoolSpace) {
// discard the old pool.
pool = null;
allocNewPool(this._readableState.highWaterMark);
}

Expand Down

0 comments on commit c846184

Please sign in to comment.