diff options
author | jam <jam@chromium.org> | 2015-10-12 10:08:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-10-12 17:09:11 +0000 |
commit | ca9c30281ab1d6136949ef5278866a84e83c091d (patch) | |
tree | 615d6a704c73c641a0c22f7a039a43aca49e27e0 /mojo | |
parent | 45a6ce2d818c1c7f8fd1a531272d069202d084c0 (diff) | |
download | chromium_src-ca9c30281ab1d6136949ef5278866a84e83c091d.zip chromium_src-ca9c30281ab1d6136949ef5278866a84e83c091d.tar.gz chromium_src-ca9c30281ab1d6136949ef5278866a84e83c091d.tar.bz2 |
Fix /analyze warnings in src/mojo/edk from r352123.
BUG=478251
Review URL: https://codereview.chromium.org/1394993005
Cr-Commit-Position: refs/heads/master@{#353540}
Diffstat (limited to 'mojo')
-rw-r--r-- | mojo/edk/system/core.cc | 2 | ||||
-rw-r--r-- | mojo/edk/system/message_pipe_dispatcher.cc | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/mojo/edk/system/core.cc b/mojo/edk/system/core.cc index a9ce556..b6e18f7 100644 --- a/mojo/edk/system/core.cc +++ b/mojo/edk/system/core.cc @@ -546,7 +546,7 @@ MojoResult Core::WaitManyInternal(const MojoHandle* handles, for (uint32_t i = 0; i < num_handles; i++) { scoped_refptr<Dispatcher> dispatcher = GetDispatcher(handles[i]); if (!dispatcher) { - if (result_index && result_index) + if (result_index) *result_index = i; return MOJO_RESULT_INVALID_ARGUMENT; } diff --git a/mojo/edk/system/message_pipe_dispatcher.cc b/mojo/edk/system/message_pipe_dispatcher.cc index 0e09554..1af5b4d 100644 --- a/mojo/edk/system/message_pipe_dispatcher.cc +++ b/mojo/edk/system/message_pipe_dispatcher.cc @@ -266,7 +266,7 @@ scoped_refptr<MessagePipeDispatcher> MessagePipeDispatcher::Deserialize( // TODO(jam): Copied below from RawChannelWin. See commment above // GetReadPlatformHandles. - ScopedPlatformHandleVectorPtr platform_handles; + ScopedPlatformHandleVectorPtr temp_platform_handles; if (message_view.transport_data_buffer()) { size_t num_platform_handles; const void* platform_handle_table; @@ -275,10 +275,10 @@ scoped_refptr<MessagePipeDispatcher> MessagePipeDispatcher::Deserialize( &platform_handle_table); if (num_platform_handles > 0) { - platform_handles = + temp_platform_handles = GetReadPlatformHandles(num_platform_handles, platform_handle_table).Pass(); - if (!platform_handles) { + if (!temp_platform_handles) { LOG(ERROR) << "Invalid number of platform handles received"; return nullptr; } @@ -292,7 +292,8 @@ scoped_refptr<MessagePipeDispatcher> MessagePipeDispatcher::Deserialize( DCHECK(message_view.transport_data_buffer()); message->SetDispatchers(TransportData::DeserializeDispatchers( message_view.transport_data_buffer(), - message_view.transport_data_buffer_size(), platform_handles.Pass())); + message_view.transport_data_buffer_size(), + temp_platform_handles.Pass())); } rv->message_queue_.AddMessage(message.Pass()); |