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 May 17, 2021
1 parent ec2dbfb commit 48b557e
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 @@ -242,10 +242,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 48b557e

Please sign in to comment.