diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-16 18:05:28 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-16 18:05:28 +0000 |
commit | 4350ec4198983c0075cab9487d16824c753ba66a (patch) | |
tree | 30f8a24bf455f00782f8f22939baa4a262ab697b /net | |
parent | c674dbea1070e03a7412f1f71f197c880b659953 (diff) | |
download | chromium_src-4350ec4198983c0075cab9487d16824c753ba66a.zip chromium_src-4350ec4198983c0075cab9487d16824c753ba66a.tar.gz chromium_src-4350ec4198983c0075cab9487d16824c753ba66a.tar.bz2 |
Don't user uninitialized variables. We should at least fail predictably in
not-reached cases.
Review URL: http://codereview.chromium.org/7362
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@3469 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/base/tcp_client_socket_libevent.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/base/tcp_client_socket_libevent.cc b/net/base/tcp_client_socket_libevent.cc index e9f2308..b117f7d 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; + int bytes_transferred = -1; switch (wait_state_) { case WAITING_READ: bytes_transferred = read(socket_, buf_, buf_len_); |