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 <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Italo A. Casas <me@italoacasas.com>
  • Loading branch information
reconbot authored and MylesBorins committed Jan 31, 2017
1 parent c604016 commit e6c74b3
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 e6c74b3

Please sign in to comment.