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

Unified Diff: sandbox/src/restricted_token_unittest.cc

Issue 2222002: Unsigned warning fix - take 2 (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 7 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 | « sandbox/src/job_unittest.cc ('k') | sandbox/src/win_utils_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sandbox/src/restricted_token_unittest.cc
===================================================================
--- sandbox/src/restricted_token_unittest.cc (revision 48256)
+++ sandbox/src/restricted_token_unittest.cc (working copy)
@@ -23,11 +23,11 @@
// Tests the initialization with NULL as parameter.
TEST(RestrictedTokenTest, DefaultInit) {
// Get the current process token.
- HANDLE token_handle = NULL;
+ HANDLE token_handle = INVALID_HANDLE_VALUE;
ASSERT_TRUE(::OpenProcessToken(::GetCurrentProcess(), TOKEN_ALL_ACCESS,
&token_handle));
- ASSERT_NE(NULL, reinterpret_cast<ULONG_PTR>(token_handle));
+ ASSERT_NE(INVALID_HANDLE_VALUE, token_handle);
ATL::CAccessToken access_token;
access_token.Attach(token_handle);
@@ -62,11 +62,11 @@
// Tests the initialization with a custom token as parameter.
TEST(RestrictedTokenTest, CustomInit) {
// Get the current process token.
- HANDLE token_handle = NULL;
+ HANDLE token_handle = INVALID_HANDLE_VALUE;
ASSERT_TRUE(::OpenProcessToken(::GetCurrentProcess(), TOKEN_ALL_ACCESS,
&token_handle));
- ASSERT_NE(NULL, reinterpret_cast<ULONG_PTR>(token_handle));
+ ASSERT_NE(INVALID_HANDLE_VALUE, token_handle);
ATL::CAccessToken access_token;
access_token.Attach(token_handle);
« no previous file with comments | « sandbox/src/job_unittest.cc ('k') | sandbox/src/win_utils_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698