From 98ce1ee2b9754b6b89f5fad0c939712c19d76aef Mon Sep 17 00:00:00 2001 From: "jhawkins@chromium.org" Date: Wed, 30 Sep 2009 22:00:50 +0000 Subject: 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 --- chrome/browser/dom_ui/tips_handler.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chrome') 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 + #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( -- cgit v1.1