diff --git a/tools/coccinelle/argv_find.cocci b/tools/coccinelle/argv_find.cocci index f13b035d7a..1ab19b749b 100644 --- a/tools/coccinelle/argv_find.cocci +++ b/tools/coccinelle/argv_find.cocci @@ -4,8 +4,10 @@ identifier argv; identifier argc; expression e1; expression e2; +identifier I; @@ +( - argv_find(argv, argc, e1, &idx); if ( - idx @@ -14,3 +16,8 @@ expression e2; { e2; } +| +- argv_find(argv, argc, e1, &idx); +... when != I = idx; + when strict +)