From: Amos Jeffries Date: Tue, 4 Jun 2013 03:55:55 +0000 (-0600) Subject: Fix assert unsigned-vs-0 comparison X-Git-Tag: SQUID_3_4_0_1~75 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3e3aefda6e61d0dc48665257e93cccc50ba5800a;p=thirdparty%2Fsquid.git Fix assert unsigned-vs-0 comparison Nodes::size_type is unsigned and cannot be <0. Detected by Coverity Scan. Issue 1026516. --- diff --git a/src/acl/Tree.cc b/src/acl/Tree.cc index 3a416aea27..4b79abaa94 100644 --- a/src/acl/Tree.cc +++ b/src/acl/Tree.cc @@ -22,7 +22,7 @@ Acl::Tree::lastAction() const allow_t Acl::Tree::actionAt(const Nodes::size_type pos) const { - assert(0 <= pos && pos < nodes.size()); + assert(pos < nodes.size()); if (actions.size()) { assert(actions.size() == nodes.size()); return actions[pos];