From 131c33efa56ce7630bf9d25e5b8c3467b5f142ed Mon Sep 17 00:00:00 2001 From: Vitaly Aminev Date: Thu, 12 Dec 2024 06:05:11 -0800 Subject: [PATCH] http2: remove duplicate codeblock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit PR-URL: https://github.com/nodejs/node/pull/55915 Reviewed-By: Yagiz Nizipli Reviewed-By: Tim Perry Reviewed-By: Luigi Pinca Reviewed-By: Richard Lau Reviewed-By: Juan José Arboleda Reviewed-By: James M Snell Reviewed-By: Jason Zhang Reviewed-By: Matteo Collina --- src/node_http2.cc | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/node_http2.cc b/src/node_http2.cc index 888f70bd4df8a3..f9b5226aea50dc 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -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(const_cast(data)); - } else { - memcpy(buf.base, data, avail); - } + data += avail; len -= avail; stream->EmitRead(avail, buf);