Skip to content

Commit f9a0cb6

Browse files
authored
fix(node_http2.cc): remove duplicate codeblock
1 parent 1d01ad6 commit f9a0cb6

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/node_http2.cc

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1314,11 +1314,7 @@ int Http2Session::OnDataChunkReceived(nghttp2_session* handle,
13141314
} else {
13151315
memcpy(buf.base, data, avail);
13161316
}
1317-
if (buf.base == nullptr) [[likely]] {
1318-
buf.base = reinterpret_cast<char*>(const_cast<uint8_t*>(data));
1319-
} else {
1320-
memcpy(buf.base, data, avail);
1321-
}
1317+
13221318
data += avail;
13231319
len -= avail;
13241320
stream->EmitRead(avail, buf);

0 commit comments

Comments
 (0)