You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2019/04/24 02:58:03 UTC
[trafficserver] branch master updated: cppcheck: Reduce the scope
of the variable 'netvc'
This is an automated email from the ASF dual-hosted git repository.
bcall pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 769923e cppcheck: Reduce the scope of the variable 'netvc'
769923e is described below
commit 769923e21556375d85afdda422533c07d82d7518
Author: Masaori Koshiba <ma...@gmail.com>
AuthorDate: Wed Apr 24 09:38:38 2019 +0800
cppcheck: Reduce the scope of the variable 'netvc'
> [Http2SessionAccept.cc:70]: (style) The scope of the variable 'netvc' can be reduced.
---
proxy/http2/Http2SessionAccept.cc | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/proxy/http2/Http2SessionAccept.cc b/proxy/http2/Http2SessionAccept.cc
index f318079..0fd55f8 100644
--- a/proxy/http2/Http2SessionAccept.cc
+++ b/proxy/http2/Http2SessionAccept.cc
@@ -67,12 +67,11 @@ Http2SessionAccept::accept(NetVConnection *netvc, MIOBuffer *iobuf, IOBufferRead
int
Http2SessionAccept::mainEvent(int event, void *data)
{
- NetVConnection *netvc;
ink_release_assert(event == NET_EVENT_ACCEPT || event == EVENT_ERROR);
ink_release_assert((event == NET_EVENT_ACCEPT) ? (data != nullptr) : (1));
if (event == NET_EVENT_ACCEPT) {
- netvc = static_cast<NetVConnection *>(data);
+ NetVConnection *netvc = static_cast<NetVConnection *>(data);
if (!this->accept(netvc, nullptr, nullptr)) {
netvc->do_io_close();
}