Skip to content

Commit

Permalink
buffer: remove unreachable code
Browse files Browse the repository at this point in the history
PR-URL: #38537
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
pd4d10 authored and targos committed Jun 11, 2021
1 parent bc2111c commit c5b86f8
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions lib/buffer.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,7 @@ function _copyActual(source, target, targetStart, sourceStart, sourceEnd) {
sourceEnd = sourceStart + target.length - targetStart;

let nb = sourceEnd - sourceStart;
const targetLen = target.length - targetStart;
const sourceLen = source.length - sourceStart;
if (nb > targetLen)
nb = targetLen;
if (nb > sourceLen)
nb = sourceLen;

Expand Down

0 comments on commit c5b86f8

Please sign in to comment.