Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1838)

Unified Diff: chrome/browser/renderer_host/audio_sync_reader.cc

Issue 2818047: Fix valgrind / heapcheck error in 51743 (Closed)
Patch Set: Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/audio_sync_reader.cc
diff --git a/chrome/browser/renderer_host/audio_sync_reader.cc b/chrome/browser/renderer_host/audio_sync_reader.cc
index 1cccfbe56583c8d531d3dc632609afcdda7f2d0d..48787e71a129244b8951a2e2cdac65d3fea0c57d 100644
--- a/chrome/browser/renderer_host/audio_sync_reader.cc
+++ b/chrome/browser/renderer_host/audio_sync_reader.cc
@@ -47,11 +47,8 @@ bool AudioSyncReader::PrepareForeignSocketHandle(
::DuplicateHandle(GetCurrentProcess(), foreign_socket_->handle(),
process_handle, foreign_handle,
0, FALSE, DUPLICATE_SAME_ACCESS);
- if (*foreign_handle != 0) {
- // Note that this is just a way to get away with the unused variable
- // warning. We want to return true here.
- return foreign_socket_.release() != NULL;
- }
+ if (*foreign_handle != 0)
+ return true;
return false;
}
#else
@@ -60,11 +57,8 @@ bool AudioSyncReader::PrepareForeignSocketHandle(
base::FileDescriptor* foreign_handle) {
foreign_handle->fd = foreign_socket_->handle();
foreign_handle->auto_close = false;
- if (foreign_handle->fd != -1) {
- // Note that this is just a way to get away with the unused variable
- // warning. We want to return true here.
- return foreign_socket_.release() != NULL;
- }
+ if (foreign_handle->fd != -1)
+ return true;
return false;
}
#endif
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698