diff options
author | raphael.kubo.da.costa <raphael.kubo.da.costa@intel.com> | 2015-02-24 04:13:04 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-02-24 12:13:45 +0000 |
commit | 81c05e116617d13b4b708792f0d2eb21ede1c829 (patch) | |
tree | 2d8205ae4eebb40b694dab5f661b2e470df46f78 /storage | |
parent | 3f660206296719b15a7383e8fbeffc08530dea5e (diff) | |
download | chromium_src-81c05e116617d13b4b708792f0d2eb21ede1c829.zip chromium_src-81c05e116617d13b4b708792f0d2eb21ede1c829.tar.gz chromium_src-81c05e116617d13b4b708792f0d2eb21ede1c829.tar.bz2 |
FileSystemUsageCache: Remove bogus unsigned integer comparisons.
Stop performing an invalid comparison (twice in a row): |dirty| is an
unsigned integer, so there is no point in comparing it to < 0.
Review URL: https://codereview.chromium.org/944873002
Cr-Commit-Position: refs/heads/master@{#317785}
Diffstat (limited to 'storage')
-rw-r--r-- | storage/browser/fileapi/file_system_usage_cache.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/storage/browser/fileapi/file_system_usage_cache.cc b/storage/browser/fileapi/file_system_usage_cache.cc index 880985b..c6baa7a 100644 --- a/storage/browser/fileapi/file_system_usage_cache.cc +++ b/storage/browser/fileapi/file_system_usage_cache.cc @@ -95,10 +95,7 @@ bool FileSystemUsageCache::DecrementDirty( bool is_valid = true; uint32 dirty = 0; int64 usage = 0; - if (!Read(usage_file_path, &is_valid, &dirty, &usage) || dirty <= 0) - return false; - - if (dirty <= 0) + if (!Read(usage_file_path, &is_valid, &dirty, &usage) || dirty == 0) return false; return Write(usage_file_path, is_valid, dirty - 1, usage); |