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 cjihrig committed Dec 20, 2016
1 parent 4510c72 commit 71ce040
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 @@ -1794,7 +1794,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 71ce040

Please sign in to comment.