From: Amos Jeffries Date: Sun, 30 Jan 2011 05:46:41 +0000 (-0700) Subject: Author: Francesco Chemolli X-Git-Tag: SQUID_3_1_11~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed96f6d26367b180d993c558e6902a7afd18a81b;p=thirdparty%2Fsquid.git Author: Francesco Chemolli Standard compliance fix: size_t is guaranteed unsigned --- diff --git a/src/String.cci b/src/String.cci index 050de32bba..c2c6bebeac 100644 --- a/src/String.cci +++ b/src/String.cci @@ -175,7 +175,8 @@ String::set(char const *loc, char const ch) void String::cut(String::size_type newLength) { - if (newLength < 0 || newLength > len_) return; + // size_type is size_t, unsigned. No need to check for newLength <0 + if (newLength > len_) return; len_ = newLength;