Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1b24d3a

Browse filesBrowse files
puzpuzpuzaddaleax
authored andcommitted
zlib: remove redundant variable in zlibBufferOnEnd
PR-URL: #34072 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
1 parent 7551a8b commit 1b24d3a
Copy full SHA for 1b24d3a

File tree

Expand file treeCollapse file tree

1 file changed

+1
-4
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-4
lines changed
Open diff view settings
Collapse file

‎lib/zlib.js‎

Copy file name to clipboardExpand all lines: lib/zlib.js
+1-4Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,17 +136,14 @@ function zlibBufferOnError(err) {
136136

137137
function zlibBufferOnEnd() {
138138
let buf;
139-
let err;
140139
if (this.nread === 0) {
141140
buf = Buffer.alloc(0);
142141
} else {
143142
const bufs = this.buffers;
144143
buf = (bufs.length === 1 ? bufs[0] : Buffer.concat(bufs, this.nread));
145144
}
146145
this.close();
147-
if (err)
148-
this.cb(err);
149-
else if (this._info)
146+
if (this._info)
150147
this.cb(null, { buffer: buf, engine: this });
151148
else
152149
this.cb(null, buf);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.