diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-16 20:39:09 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-16 20:39:09 +0000 |
commit | b12c83d58dbe64119f0e1471bf93dca9f823267b (patch) | |
tree | 1cae27f7d2fb5c8dcbbd0ef6d3f2faa467f2edf3 /net | |
parent | 0e75a7333e0188a19e329f81dd1fef9d3664eb42 (diff) | |
download | chromium_src-b12c83d58dbe64119f0e1471bf93dca9f823267b.zip chromium_src-b12c83d58dbe64119f0e1471bf93dca9f823267b.tar.gz chromium_src-b12c83d58dbe64119f0e1471bf93dca9f823267b.tar.bz2 |
Don't call the callback in an unexpected case that will never happen anyway.
Review URL: http://codereview.chromium.org/7449
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3483 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/tcp_client_socket_libevent.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/base/tcp_client_socket_libevent.cc b/net/base/tcp_client_socket_libevent.cc index b117f7d..abe1625 100644 --- a/net/base/tcp_client_socket_libevent.cc +++ b/net/base/tcp_client_socket_libevent.cc @@ -259,7 +259,7 @@ void TCPClientSocket::DidCompleteConnect() { } void TCPClientSocket::DidCompleteIO() { - int bytes_transferred = -1; + int bytes_transferred; switch (wait_state_) { case WAITING_READ: bytes_transferred = read(socket_, buf_, buf_len_); @@ -269,6 +269,7 @@ void TCPClientSocket::DidCompleteIO() { break; default: NOTREACHED(); + return; } int result; |