Skip to content

buffer: remove unreachable code - #27445

Closed
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:unreachable-buffer
Closed

buffer: remove unreachable code#27445
Trott wants to merge 1 commit into
nodejs:masterfrom
Trott:unreachable-buffer

Conversation

@Trott

Copy link
Copy Markdown
Member

Remove unreachable code from lib/buffer.js.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

Remove unreachable code from lib/buffer.js.
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@nodejs-github-botnodejs-github-bot added the buffer Issues and PRs related to the buffer subsystem. label Apr 28, 2019
@Trott

Copy link
Copy Markdown
MemberAuthor

The check for offset === undefined will always be false due to the earlier check for offset === undefined in the function. Coverage reports are consistent with this, showing the if block never executing.

@nodejs-github-bot

nodejs-github-bot commented Apr 28, 2019

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/22752/ (:white_check_mark:)

@TrottTrott added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Apr 28, 2019
@Trott

Copy link
Copy Markdown
MemberAuthor

Landed in 524dd46

@TrottTrott closed this Apr 30, 2019
Trott added a commit to Trott/io.js that referenced this pull request Apr 30, 2019
Remove unreachable code from lib/buffer.js.
PR-URL: nodejs#27445
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
targos pushed a commit that referenced this pull request Apr 30, 2019
Remove unreachable code from lib/buffer.js.
PR-URL: #27445
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
@targostargos mentioned this pull request May 6, 2019
@Trott
Trott deleted the unreachable-buffer branch January 13, 2022 22:51
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.bufferIssues and PRs related to the buffer subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@Trott@nodejs-github-bot@addaleax@lpinca@targos@cjihrig@BridgeAR@ZYSzys