summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 16:52:01 +0000
committerhans@chromium.org <hans@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-13 16:52:01 +0000
commit6714f3048ea032bbe62b2566583a2790d78fc644 (patch)
treed4f486b88d7311f7ea24940f3a890f5d763f612a /net
parent83765b8ca9266b02c9e2cebd29887098ae856b5d (diff)
downloadchromium_src-6714f3048ea032bbe62b2566583a2790d78fc644.zip
chromium_src-6714f3048ea032bbe62b2566583a2790d78fc644.tar.gz
chromium_src-6714f3048ea032bbe62b2566583a2790d78fc644.tar.bz2
balsa_headers.h: remove redundant idx_ tests.
idx_ is of type HeaderLines::size_type, which is std::vector<>::size_type, which is always unsigned. So idx_ >= 0 is always going to be true, and Clang warns about such tests. BUG=none TEST=flip_in_mem_edsm_server Review URL: http://codereview.chromium.org/5712006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69006 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/tools/flip_server/balsa_headers.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/net/tools/flip_server/balsa_headers.h b/net/tools/flip_server/balsa_headers.h
index a33e857..ab8a31a 100644
--- a/net/tools/flip_server/balsa_headers.h
+++ b/net/tools/flip_server/balsa_headers.h
@@ -502,16 +502,14 @@ class BalsaHeaders {
const HeaderLines::size_type original_idx = idx_;
do {
--idx_;
- } while (idx_ >= 0 &&
- idx_ < header_lines_size &&
- header_lines[idx_].skip == true);
+ } while (idx_ < header_lines_size && header_lines[idx_].skip == true);
// The condition below exists so that --(rbegin() + 1) == rbegin(), even
// if there are only 'skip == true' elements between the rbegin() iterator
// and the beginning of the vector of HeaderLineDescriptions.
// TODO(fenix): refactor this list so that we don't have to do
// linear scanning through skipped headers (and this condition is
// then unnecessary)
- if (idx_ < 0 || idx_ > header_lines_size) {
+ if (idx_ > header_lines_size) {
idx_ = original_idx - 1;
}
}
@@ -1279,4 +1277,3 @@ class BalsaHeaders {
} // namespace net
#endif // NET_TOOLS_FLIP_SERVER_BALSA_HEADERS_H_
-