]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove some NULL references from adaptation/icap/ModXact.cc
authorAmos Jeffries <squid3@treenet.co.nz>
Thu, 23 Feb 2017 03:50:31 +0000 (16:50 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Thu, 23 Feb 2017 03:50:31 +0000 (16:50 +1300)
This may resolve one odd false-positive by Coverity. Gets rid of some NULL anyhow if not.

src/adaptation/icap/ModXact.cc

index 9ed17fb7989f6041c8256f4ecc2f2db14ec97f1c..b09ee26bc75079c982100af662a13d043d0355ad 100644 (file)
@@ -1604,12 +1604,11 @@ Adaptation::Icap::ModXact::encapsulateHead(MemBuf &icapBuf, const char *section,
         new_reply->sline = old_reply->sline;
         headClone = new_reply.getRaw();
     }
-    Must(headClone != NULL);
+    Must(headClone);
     headClone->inheritProperties(head);
 
     HttpHeaderPos pos = HttpHeaderInitPos;
-    HttpHeaderEntry* p_head_entry = NULL;
-    while (NULL != (p_head_entry = head->header.getEntry(&pos)) )
+    while (HttpHeaderEntry* p_head_entry = head->header.getEntry(&pos))
         headClone->header.addEntry(p_head_entry->clone());
 
     // end cloning