Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
buffer: remove unreachable code
  • Loading branch information
pd4d10 committed May 4, 2021
commit b306b191215de4b5368f737809f1126e7d583783
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