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

Unified Diff: sandbox/win/src/sandbox_utils.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
« sandbox/win/src/sandbox_nt_util.cc ('K') | « sandbox/win/src/sandbox_nt_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/win/src/sandbox_utils.cc
===================================================================
--- sandbox/win/src/sandbox_utils.cc (revision 157289)
+++ sandbox/win/src/sandbox_utils.cc (working copy)
@@ -26,10 +26,8 @@
GetModuleHandleExFunction get_module_handle_ex = reinterpret_cast<
GetModuleHandleExFunction>(::GetProcAddress(kernel32_base,
"GetModuleHandleExW"));
- if (get_module_handle_ex) {
- BOOL ret = get_module_handle_ex(flags, module_name, module);
- return (ret ? true : false);
- }
+ if (get_module_handle_ex)
+ return !!get_module_handle_ex(flags, module_name, module);
rvargas (doing something else) 2012/09/18 18:56:28 This one I actually dislike a lot. how about xx !=
Lei Zhang 2012/09/19 01:32:41 Done.
Peter Kasting 2012/09/19 21:26:31 We shouldn't need the "!!" or the "!= FALSE", shou
rvargas (doing something else) 2012/09/19 21:35:13 There's the annoying "performance" warning of VS a
if (!flags) {
*module = ::LoadLibrary(module_name);
« sandbox/win/src/sandbox_nt_util.cc ('K') | « sandbox/win/src/sandbox_nt_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698