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

Unified Diff: sandbox/src/sharedmem_ipc_server.cc

Issue 7234009: sandbox: avoid an extra if() which is not required and is wrong (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 6 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: sandbox/src/sharedmem_ipc_server.cc
===================================================================
--- sandbox/src/sharedmem_ipc_server.cc (revision 89804)
+++ sandbox/src/sharedmem_ipc_server.cc (working copy)
@@ -129,20 +129,18 @@
// Releases memory allocated for IPC arguments, if needed.
void ReleaseArgs(const IPCParams* ipc_params, void* args[kMaxIpcParams]) {
for (size_t i = 0; i < kMaxIpcParams; i++) {
- if (args[i]) {
- switch (ipc_params->args[i]) {
- case WCHAR_TYPE: {
- delete reinterpret_cast<std::wstring*>(args[i]);
- args[i] = NULL;
- break;
- }
- case INOUTPTR_TYPE: {
- delete reinterpret_cast<CountedBuffer*>(args[i]);
- args[i] = NULL;
- break;
- }
- default: break;
+ switch (ipc_params->args[i]) {
+ case WCHAR_TYPE: {
+ delete reinterpret_cast<std::wstring*>(args[i]);
+ args[i] = NULL;
+ break;
}
+ case INOUTPTR_TYPE: {
+ delete reinterpret_cast<CountedBuffer*>(args[i]);
+ args[i] = NULL;
+ break;
+ }
+ default: break;
}
}
}
« 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