diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 02:05:01 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 02:05:01 +0000 |
commit | a98411c384ac171834f4d27526a96abc1a44a8b2 (patch) | |
tree | f5f520f6764df854d0b193257585279cc2425ebf /chrome/common/service_process_util_posix.cc | |
parent | 639211895adb7db5164bfab8b607a9b51ce66f1a (diff) | |
download | chromium_src-a98411c384ac171834f4d27526a96abc1a44a8b2.zip chromium_src-a98411c384ac171834f4d27526a96abc1a44a8b2.tar.gz chromium_src-a98411c384ac171834f4d27526a96abc1a44a8b2.tar.bz2 |
Coverity: Initialize member variables.
CID=11644,14447,14816,15428
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6670016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77763 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/service_process_util_posix.cc')
-rw-r--r-- | chrome/common/service_process_util_posix.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome/common/service_process_util_posix.cc b/chrome/common/service_process_util_posix.cc index 189fd7f..504570b 100644 --- a/chrome/common/service_process_util_posix.cc +++ b/chrome/common/service_process_util_posix.cc @@ -52,7 +52,10 @@ static void SigTermHandler(int sig, siginfo_t* info, void* uap) { } } -ServiceProcessState::StateData::StateData() {} +ServiceProcessState::StateData::StateData() : set_action_(false) { + memset(sockets_, -1, sizeof(sockets_)); + memset(&old_action_, 0, sizeof(old_action_)); +} void ServiceProcessState::StateData::SignalReady() { CHECK(MessageLoopForIO::current()->WatchFileDescriptor( @@ -81,13 +84,10 @@ void ServiceProcessState::StateData::SignalReady() { ServiceProcessState::StateData::~StateData() {} -bool ServiceProcessState::InitializeState() { +bool ServiceProcessState::CreateState() { CHECK(!state_); state_ = new StateData; state_->AddRef(); - state_->sockets_[0] = -1; - state_->sockets_[1] = -1; - state_->set_action_ = false; return true; } |