]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix another Must(!= NULL) coverity issue.
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 23 Feb 2017 10:02:10 +0000 (23:02 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 23 Feb 2017 10:02:10 +0000 (23:02 +1300)
The issue is that Coverity Scan gets confused by implicit casting of NULL
to a Pointer into thinking that 'true' comparison is possible when NULL
is involved. The != should still compile to the correct checks.

 Coverity Scan issue 1364725.

src/adaptation/icap/ModXact.cc

index b09ee26bc75079c982100af662a13d043d0355ad..b182b1b6c361e51f4a5d751a03b992e620340cd3 100644 (file)
@@ -974,7 +974,7 @@ void Adaptation::Icap::ModXact::prepEchoing()
         } else if (dynamic_cast<const HttpReply*>(oldHead)) {
             newHead = new HttpReply;
         }
-        Must(newHead != NULL);
+        Must(newHead);
 
         newHead->inheritProperties(oldHead);