From: Amos Jeffries Date: Fri, 2 Oct 2009 08:31:21 +0000 (+1300) Subject: Author: Henrik Nordstrom X-Git-Tag: SQUID_3_0_STABLE20~13 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eff8f9d31dd1b2db602a71c63a41d6b689a38ee5;p=thirdparty%2Fsquid.git Author: Henrik Nordstrom 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 --- diff --git a/src/ACLProxyAuth.cc b/src/ACLProxyAuth.cc index 354f8dceea..092dd3a528 100644 --- a/src/ACLProxyAuth.cc +++ b/src/ACLProxyAuth.cc @@ -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); } diff --git a/src/client_side_request.cc b/src/client_side_request.cc index ce5e467c4a..5ccb0faec1 100644 --- a/src/client_side_request.cc +++ b/src/client_side_request.cc @@ -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;