diff options
author | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-30 22:00:50 +0000 |
---|---|---|
committer | jhawkins@chromium.org <jhawkins@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-30 22:00:50 +0000 |
commit | 98ce1ee2b9754b6b89f5fad0c939712c19d76aef (patch) | |
tree | 51e1b69e2070d5f5d5c2b4e46b2b494c5b5ee075 /chrome/browser/dom_ui/tips_handler.cc | |
parent | e6638b5e1f0466b5fb64ad675878a753bade628b (diff) | |
download | chromium_src-98ce1ee2b9754b6b89f5fad0c939712c19d76aef.zip chromium_src-98ce1ee2b9754b6b89f5fad0c939712c19d76aef.tar.gz chromium_src-98ce1ee2b9754b6b89f5fad0c939712c19d76aef.tar.bz2 |
Coverity: tips_cache_->GetSize() returns an unsigned int so the comparison >= 0 is always true. Change the check to != 0 to actually have an effect.
CID=6044
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/255030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27662 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/tips_handler.cc')
-rw-r--r-- | chrome/browser/dom_ui/tips_handler.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/dom_ui/tips_handler.cc b/chrome/browser/dom_ui/tips_handler.cc index 06f73f3..888bfa1 100644 --- a/chrome/browser/dom_ui/tips_handler.cc +++ b/chrome/browser/dom_ui/tips_handler.cc @@ -2,6 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. +#include <string> + #include "base/string_util.h" #include "base/values.h" #include "chrome/browser/browser_process.h" @@ -50,7 +52,7 @@ void TipsHandler::HandleGetTips(const Value* content) { } } - if (tips_cache_ != NULL && tips_cache_->GetSize() >= 0) { + if (tips_cache_ != NULL && tips_cache_->GetSize() != 0) { if (tips_cache_->GetInteger( WebResourceService::kCurrentTipPrefName, ¤t_tip_index) && tips_cache_->GetList( |