]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
coccinelle: protecting regexp operator is not needed
authorEric Leblond <eric@regit.org>
Fri, 20 Dec 2013 09:23:39 +0000 (10:23 +0100)
committerVictor Julien <victor@inliniac.net>
Fri, 10 Jan 2014 13:46:38 +0000 (14:46 +0100)
It seems there was an evolution of coccinelle and the protection
of regexp is not necessary anymore. And doing it causing the
expression not to match.

qa/coccinelle/banned-functions.cocci
qa/coccinelle/size_t.cocci

index f7343f2aa1e0178630d6523a4e7b775d399bf479..03f343853690ee06229022118dc60f78be52e28a 100644 (file)
@@ -1,5 +1,5 @@
 @banned@
-identifier func =~ "^\(sprintf\|strcat\|strcpy\|strncpy\|strncat\)$";
+identifier func =~ "^(sprintf|strcat|strcpy|strncpy|strncat)$";
 position p1;
 @@
 
index ec1db56e7ff3e5a15461aa6ee04b1860d0d4ad6a..4bd5b9f26c9e5a0159709b1278bd2de4a7b51f8d 100644 (file)
@@ -1,6 +1,6 @@
 @sizet@
 size_t p;
-identifier func =~ "^\(sprintf\|printf\|SCLog.*\)$";
+identifier func =~ "^(sprintf|printf|SCLog.*)$";
 identifier funcn =~ "^.*nprintf$";
 position p1;
 typedef uint16_t;