Skip to content

Commit

Permalink
http2: remove duplicate codeblock
Browse files Browse the repository at this point in the history
  • Loading branch information
AVVS committed Nov 19, 2024
1 parent 1d01ad6 commit 6cefd81
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/node_http2.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1314,11 +1314,7 @@ int Http2Session::OnDataChunkReceived(nghttp2_session* handle,
} else {
memcpy(buf.base, data, avail);
}
if (buf.base == nullptr) [[likely]] {
buf.base = reinterpret_cast<char*>(const_cast<uint8_t*>(data));
} else {
memcpy(buf.base, data, avail);
}

data += avail;
len -= avail;
stream->EmitRead(avail, buf);
Expand Down

0 comments on commit 6cefd81

Please sign in to comment.