Skip to content

Commit 8d449c9

Browse files
puzpuzpuzMylesBorins
authored andcommitted
zlib: remove redundant variable in zlibBufferOnEnd
PR-URL: #34072 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Richard Lau <[email protected]>
1 parent 3db9432 commit 8d449c9

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/zlib.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -138,17 +138,14 @@ function zlibBufferOnError(err) {
138138

139139
function zlibBufferOnEnd() {
140140
let buf;
141-
let err;
142141
if (this.nread === 0) {
143142
buf = Buffer.alloc(0);
144143
} else {
145144
const bufs = this.buffers;
146145
buf = (bufs.length === 1 ? bufs[0] : Buffer.concat(bufs, this.nread));
147146
}
148147
this.close();
149-
if (err)
150-
this.cb(err);
151-
else if (this._info)
148+
if (this._info)
152149
this.cb(null, { buffer: buf, engine: this });
153150
else
154151
this.cb(null, buf);

0 commit comments

Comments
 (0)