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

Unified Diff: sandbox/win/src/sandbox_nt_util.cc

Issue 10942004: Cleanup: avoid foo ? true : false, part 2. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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
Index: sandbox/win/src/sandbox_nt_util.cc
===================================================================
--- sandbox/win/src/sandbox_nt_util.cc (revision 157289)
+++ sandbox/win/src/sandbox_nt_util.cc (working copy)
@@ -13,14 +13,10 @@
// This is the list of all imported symbols from ntdll.dll.
SANDBOX_INTERCEPT NtExports g_nt = { NULL };
-}
rvargas (doing something else) 2012/09/18 18:56:28 I actually prefer if the anonymous namespace is no
Lei Zhang 2012/09/19 01:32:41 Done.
-
namespace {
#if defined(_WIN64)
void* AllocateNearTo(void* source, size_t size) {
- using sandbox::g_nt;
-
// Start with 1 GB above the source.
const unsigned int kOneGB = 0x40000000;
void* base = reinterpret_cast<char*>(source) + kOneGB;
@@ -70,7 +66,6 @@
}
#else // defined(_WIN64).
void* AllocateNearTo(void* source, size_t size) {
- using sandbox::g_nt;
UNREFERENCED_PARAMETER(source);
// In 32-bit processes allocations below 512k are predictable, so mark
@@ -99,8 +94,6 @@
} // namespace.
-namespace sandbox {
-
// Handle for our private heap.
void* g_heap = NULL;
@@ -166,7 +159,7 @@
g_nt.RtlDestroyHeap(heap);
}
}
- return (g_heap) ? true : false;
+ return (g_heap != NULL);
}
// Physically reads or writes from memory to verify that (at this time), it is

Powered by Google App Engine
This is Rietveld 408576698