Skip to content

Commit

Permalink
http2: remove duplicate codeblock
Browse files Browse the repository at this point in the history
PR-URL: nodejs#55915
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Jason Zhang <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
  • Loading branch information
AVVS authored Dec 12, 2024
1 parent be04d06 commit 131c33e
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 @@ -1316,11 +1316,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 131c33e

Please sign in to comment.