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 and aduh95 committed Dec 18, 2024
1 parent efcc5d9 commit febd969
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 febd969

Please sign in to comment.