]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Henrik Nordstrom <henrik@henriknordstrom.net>
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 2 Oct 2009 08:31:21 +0000 (21:31 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 2 Oct 2009 08:31:21 +0000 (21:31 +1300)
Split some asserts with side-effects

assert expressions should not have any noticeable sideffects or otherwise
be important for the program flow operation. If not unexpected results is
seen from compiling with -DNODEBUG

src/ACLProxyAuth.cc
src/client_side_request.cc

index 354f8dceea2d465ddd070a69d0153ca045c883d2..092dd3a528b94c41bf1a28fb01ce336b8668d7c9 100644 (file)
@@ -143,7 +143,8 @@ ProxyAuthLookup::checkForAsync(ACLChecklist *checklist)const
     assert(checklist->auth_user_request != NULL);
     auth_user_request = checklist->auth_user_request;
 
-    assert(authenticateValidateUser(auth_user_request));
+    int validated = authenticateValidateUser(auth_user_request);
+    assert(validated);
     auth_user_request->start(LookupDone, checklist);
 }
 
index ce5e467c4a2682f5f2d65160840def6d3f27c85b..5ccb0faec1033d41770b43aa9b1172a4b8bff93f 100644 (file)
@@ -1125,7 +1125,8 @@ ClientHttpRequest::noteIcapAnswer(HttpMsg *msg)
         // subscribe to receive reply body
         if (new_rep->body_pipe != NULL) {
             icapBodySource = new_rep->body_pipe;
-            assert(icapBodySource->setConsumerIfNotLate(this));
+            int consumer_ok = icapBodySource->setConsumerIfNotLate(this);
+            assert(consumer_ok);
         }
 
         clientStreamNode *node = (clientStreamNode *)client_stream.tail->prev->data;