Skip to content

Commit

Permalink
buffer: remove unreachable code
Browse files Browse the repository at this point in the history
Remove unreachable code from lib/buffer.js.

PR-URL: #27445
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Yongsheng Zhang <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
  • Loading branch information
Trott authored and targos committed Apr 30, 2019
1 parent 3711684 commit 53eefeb
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -894,11 +894,7 @@ Buffer.prototype.write = function write(string, offset, length, encoding) {

// Buffer#write(string, offset[, length][, encoding])
} else {
if (offset === undefined) {
offset = 0;
} else {
validateInt32(offset, 'offset', 0, this.length);
}
validateInt32(offset, 'offset', 0, this.length);

const remaining = this.length - offset;

Expand Down

0 comments on commit 53eefeb

Please sign in to comment.