]> git.droids-corp.org - dpdk.git/blobdiff - devtools/checkpatches.sh
devtools: fix check of variable declaration inside for
[dpdk.git] / devtools / checkpatches.sh
index 27ab1252b73165267eff4b7918536090d1d83d75..58021aa5dd09a230288478d5bd1f491854c29ebb 100755 (executable)
@@ -71,7 +71,7 @@ check_forbidden_additions() { # <patch>
 
        # forbid variable declaration inside "for" loop
        awk -v FOLDERS='.' \
-               -v EXPRESSIONS='for *\\((char|u?int|unsigned|s?size_t)' \
+               -v EXPRESSIONS='for[[:space:]]*\\((char|u?int|unsigned|s?size_t)' \
                -v RET_ON_FAIL=1 \
                -v MESSAGE='Declaring a variable inside for()' \
                -f $(dirname $(readlink -f $0))/check-forbidden-tokens.awk \