From 6cefd813ff32b09c4d9b61f36b529acaac3b2f7f Mon Sep 17 00:00:00 2001 From: Vitaly Aminev Date: Mon, 18 Nov 2024 20:21:50 -0800 Subject: [PATCH] http2: remove duplicate codeblock --- 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 593c8b5f07a2a4..5dd38e04353355 100644 --- a/src/node_http2.cc +++ b/src/node_http2.cc @@ -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(const_cast(data)); - } else { - memcpy(buf.base, data, avail); - } + data += avail; len -= avail; stream->EmitRead(avail, buf);