summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorraphael.kubo.da.costa <raphael.kubo.da.costa@intel.com>2015-02-24 04:13:04 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-24 12:13:45 +0000
commit81c05e116617d13b4b708792f0d2eb21ede1c829 (patch)
tree2d8205ae4eebb40b694dab5f661b2e470df46f78 /storage
parent3f660206296719b15a7383e8fbeffc08530dea5e (diff)
downloadchromium_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.cc5
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);