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

Unified Diff: chromeos/dbus/debug_daemon_client.cc

Issue 176693003: chromeos: Make dbus::MessageReader memory ownership explicit (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove unnecessary reinterpret_cast Created 6 years, 10 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 | « chromeos/dbus/cryptohome_client.cc ('k') | chromeos/dbus/session_manager_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/dbus/debug_daemon_client.cc
diff --git a/chromeos/dbus/debug_daemon_client.cc b/chromeos/dbus/debug_daemon_client.cc
index 9d06e5f721003de08cbca3428d8f33965f30a0a8..25a55e331f75946d92088a2da819e140743e3329 100644
--- a/chromeos/dbus/debug_daemon_client.cc
+++ b/chromeos/dbus/debug_daemon_client.cc
@@ -514,12 +514,10 @@ class DebugDaemonClientImpl : public DebugDaemonClient {
}
dbus::MessageReader reader(response);
- uint8* buffer = NULL;
+ const uint8* buffer = NULL;
size_t buf_size = 0;
- if (!reader.PopArrayOfBytes(reinterpret_cast<uint8**>(
- &buffer), &buf_size)) {
+ if (!reader.PopArrayOfBytes(&buffer, &buf_size))
return;
- }
// TODO(asharif): Figure out a way to avoid this copy.
data.insert(data.end(), buffer, buffer + buf_size);
« no previous file with comments | « chromeos/dbus/cryptohome_client.cc ('k') | chromeos/dbus/session_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698