summaryrefslogtreecommitdiffstats
path: root/sandbox
diff options
context:
space:
mode:
authorcpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-27 18:43:50 +0000
committercpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-27 18:43:50 +0000
commit50dc3d38b5bdb47a0d81a20c76557c2990e33f40 (patch)
tree7a8f8226d20c9c936e0504e89af127dbea65374d /sandbox
parent125ab6c9923e4c97f10049dc76d348fa60786bf0 (diff)
downloadchromium_src-50dc3d38b5bdb47a0d81a20c76557c2990e33f40.zip
chromium_src-50dc3d38b5bdb47a0d81a20c76557c2990e33f40.tar.gz
chromium_src-50dc3d38b5bdb47a0d81a20c76557c2990e33f40.tar.bz2
Fix incorrect usage of ScopedHandle
- Aftermath of my previous checkin that broke the sbox tests TBR=rvargas git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1454 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sandbox')
-rw-r--r--sandbox/src/file_policy_test.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/sandbox/src/file_policy_test.cc b/sandbox/src/file_policy_test.cc
index 15610e8..145d03a 100644
--- a/sandbox/src/file_policy_test.cc
+++ b/sandbox/src/file_policy_test.cc
@@ -106,8 +106,7 @@ SBOX_TESTS_COMMAND int File_Create(int argc, wchar_t **argv) {
ScopedHandle file2(CreateFile(argv[1], FILE_EXECUTE, kSharing, NULL,
OPEN_EXISTING, 0, NULL));
- if (INVALID_HANDLE_VALUE != file1.Get() &&
- INVALID_HANDLE_VALUE != file2.Get())
+ if (file1.Get() && file2.Get())
return SBOX_TEST_SUCCEEDED;
return SBOX_TEST_DENIED;
} else {
@@ -116,8 +115,7 @@ SBOX_TESTS_COMMAND int File_Create(int argc, wchar_t **argv) {
ScopedHandle file2(CreateFile(argv[1], GENERIC_READ | FILE_WRITE_DATA,
kSharing, NULL, OPEN_EXISTING, 0, NULL));
- if (INVALID_HANDLE_VALUE != file1.Get() &&
- INVALID_HANDLE_VALUE != file2.Get())
+ if (file1.Get() && file2.Get())
return SBOX_TEST_SUCCEEDED;
return SBOX_TEST_DENIED;
}