]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Portability fix: size_t is unsigned
authorFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 26 Jan 2011 13:27:33 +0000 (14:27 +0100)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Wed, 26 Jan 2011 13:27:33 +0000 (14:27 +0100)
src/String.cci

index abe17e518402331967900bafde58de31f0a81396..fe6b8fed741780a30612a553bee56acb6058592f 100644 (file)
@@ -174,7 +174,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;