diff options
-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()); |