Commit 4b74a4b6 authored by jbroman@chromium.org's avatar jbroman@chromium.org

Negative check for a HANDLE is invalid.

kInvalidPlatformFileValue is the invalid platform file handle.

BUG=271533

Review URL: https://chromiumcodereview.appspot.com/22841004

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217103 0039d316-1c4b-4281-b951-d872f2087c98
parent 3e7cf702
...@@ -121,7 +121,7 @@ int64 SeekPlatformFile(PlatformFile file, ...@@ -121,7 +121,7 @@ int64 SeekPlatformFile(PlatformFile file,
PlatformFileWhence whence, PlatformFileWhence whence,
int64 offset) { int64 offset) {
base::ThreadRestrictions::AssertIOAllowed(); base::ThreadRestrictions::AssertIOAllowed();
if (file < 0 || offset < 0) if (file == kInvalidPlatformFileValue || offset < 0)
return -1; return -1;
LARGE_INTEGER distance, res; LARGE_INTEGER distance, res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment