diff options
author | kinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-12 21:54:35 +0000 |
---|---|---|
committer | kinaba@chromium.org <kinaba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-12-12 21:54:35 +0000 |
commit | 3c19bd51b1a7944652820541486412007eb6f8d9 (patch) | |
tree | 8b96658d29d341f12539854e0d10ee1bd5207f18 /net/base | |
parent | 351db0c9c64948e1c304085855631e0157aa04fb (diff) | |
download | chromium_src-3c19bd51b1a7944652820541486412007eb6f8d9.zip chromium_src-3c19bd51b1a7944652820541486412007eb6f8d9.tar.gz chromium_src-3c19bd51b1a7944652820541486412007eb6f8d9.tar.bz2 |
net::FileStream::Available() should be callable when the available bytes = 0.
This patch just changes DCHECK_GT(Available, 0) to DCHECK_GE(Available, 0).
Since error condition is returned as a negative value, 0 won't conflict.
Moreover, it should be quite reasonable to query it at the end of the file
(especially considering an empty file).
BUG=none
Review URL: https://chromiumcodereview.appspot.com/11558005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@172666 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base')
-rw-r--r-- | net/base/file_stream.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/base/file_stream.cc b/net/base/file_stream.cc index 05f1460..036fd19 100644 --- a/net/base/file_stream.cc +++ b/net/base/file_stream.cc @@ -113,7 +113,7 @@ int64 FileStream::Available() { if (size < 0) return size; - DCHECK_GT(size, cur_pos); + DCHECK_GE(size, cur_pos); return size - cur_pos; } |