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: nodejs#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 committed Apr 30, 2019
1 parent 1001433 commit 524dd46
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 524dd46

Please sign in to comment.