Skip to content

Commit

Permalink
http2: remove duplicate codeblock
Browse files Browse the repository at this point in the history
PR-URL: #55915
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jason Zhang <xzha4350@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
  • 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.