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

Unified Diff: base/platform_file_win.cc

Issue 22841004: Negative check for a HANDLE is invalid. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 4 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: base/platform_file_win.cc
diff --git a/base/platform_file_win.cc b/base/platform_file_win.cc
index 977a819fcfa70eef7cde008a4909324071700a26..c5b49fa7e88ef1fea45c049e12822837b5c44f7e 100644
--- a/base/platform_file_win.cc
+++ b/base/platform_file_win.cc
@@ -121,7 +121,7 @@ int64 SeekPlatformFile(PlatformFile file,
PlatformFileWhence whence,
int64 offset) {
base::ThreadRestrictions::AssertIOAllowed();
- if (file < 0 || offset < 0)
+ if (file == kInvalidPlatformFileValue || offset < 0)
return -1;
LARGE_INTEGER distance, res;
« 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