Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1179)

Unified Diff: webrtc/rtc_base/proxyserver.cc

Issue 2988153003: Replace CHECK(x && y) with two separate CHECK() calls (Closed)
Patch Set: fix mistakes Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/rtc_base/opensslstreamadapter.cc ('k') | webrtc/rtc_base/socketaddress.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/rtc_base/proxyserver.cc
diff --git a/webrtc/rtc_base/proxyserver.cc b/webrtc/rtc_base/proxyserver.cc
index 18dceac5be50d82a9139f3c0eb1d60db3e47fe64..c00e24319e0ea23ae4be442b737b8308bedb99aa 100644
--- a/webrtc/rtc_base/proxyserver.cc
+++ b/webrtc/rtc_base/proxyserver.cc
@@ -43,7 +43,8 @@ SocketAddress ProxyServer::GetServerAddress() {
}
void ProxyServer::OnAcceptEvent(AsyncSocket* socket) {
- RTC_DCHECK(socket != nullptr && socket == server_socket_.get());
+ RTC_DCHECK(socket);
+ RTC_DCHECK_EQ(socket, server_socket_.get());
AsyncSocket* int_socket = socket->Accept(nullptr);
AsyncProxyServerSocket* wrapped_socket = WrapSocket(int_socket);
AsyncSocket* ext_socket = ext_factory_->CreateAsyncSocket(ext_ip_.family(),
@@ -84,7 +85,8 @@ ProxyBinding::~ProxyBinding() = default;
void ProxyBinding::OnConnectRequest(AsyncProxyServerSocket* socket,
const SocketAddress& addr) {
- RTC_DCHECK(!connected_ && ext_socket_.get() != nullptr);
+ RTC_DCHECK(!connected_);
+ RTC_DCHECK(ext_socket_);
ext_socket_->Connect(addr);
// TODO: handle errors here
}
« no previous file with comments | « webrtc/rtc_base/opensslstreamadapter.cc ('k') | webrtc/rtc_base/socketaddress.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698