]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
ICC: size_t is guaranteed to be >=0
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 7 Apr 2011 12:42:02 +0000 (00:42 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 7 Apr 2011 12:42:02 +0000 (00:42 +1200)
src/adaptation/icap/ModXact.cc
src/adaptation/icap/Xaction.cc

index 48e548c3f22416ad5c39437210ab51e8a4b11ece..812879de58c8576f744fc5bc42afcce7a8dc42ce 100644 (file)
@@ -1496,8 +1496,6 @@ void Adaptation::Icap::ModXact::decideOnPreview()
 
     // we decided to do preview, now compute its size
 
-    Must(wantedSize >= 0);
-
     // cannot preview more than we can backup
     size_t ad = min(wantedSize, TheBackupLimit);
 
@@ -1766,7 +1764,7 @@ void Adaptation::Icap::VirginBodyAct::disable()
 void Adaptation::Icap::VirginBodyAct::progress(size_t size)
 {
     Must(active());
-    Must(size >= 0);
+    Must(static_cast<int64_t>(size) >= 0);
     theStart += static_cast<int64_t>(size);
 }
 
@@ -1783,7 +1781,6 @@ Adaptation::Icap::Preview::Preview(): theWritten(0), theAd(0), theState(stDisabl
 void Adaptation::Icap::Preview::enable(size_t anAd)
 {
     // TODO: check for anAd not exceeding preview size limit
-    Must(anAd >= 0);
     Must(!enabled());
     theAd = anAd;
     theState = stWriting;
index 3e1f3b5d4156e3a158cacefb655d7dda97eb5911..7bd9b31f6b5c10541682548d239b772deb48535f 100644 (file)
@@ -358,7 +358,6 @@ void Adaptation::Icap::Xaction::noteCommRead(const CommIoCbParams &io)
     reader = NULL;
 
     Must(io.flag == COMM_OK);
-    Must(io.size >= 0);
 
     if (!io.size) {
         commEof = true;