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.
} else if (dynamic_cast<const HttpReply*>(oldHead)) {
newHead = new HttpReply;
}
- Must(newHead != NULL);
+ Must(newHead);
newHead->inheritProperties(oldHead);
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