]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
coccinelle: add new correct case to error treatment
authorEric Leblond <eric@regit.org>
Thu, 8 Nov 2012 23:09:06 +0000 (00:09 +0100)
committerEric Leblond <eric@regit.org>
Fri, 9 Nov 2012 15:17:12 +0000 (16:17 +0100)
qa/coccinelle/malloc-error-check.cocci

index 93bc6c6a012467bebc6f35937348181a32e17394..67769a042a8eac4932c649feb631550a61c6252d 100644 (file)
@@ -28,6 +28,8 @@ x@p1 = func(...)
 (
 if (unlikely(x == NULL)) S1
 |
+if (likely(x != NULL)) S1
+|
 if (x == NULL) S1
 |
 if (x != NULL) S1 else S2