Skip to content

Commit 6cefd81

Browse files
committed
http2: remove duplicate codeblock
1 parent 1d01ad6 commit 6cefd81

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)