diff options
| author | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-05-12 10:09:42 +0300 |
|---|---|---|
| committer | Donatas Abraitis <donatas@opensourcerouting.org> | 2022-05-12 10:09:42 +0300 |
| commit | ededfdb4d19be8f934b52164073f90f0de17c3b3 (patch) | |
| tree | efeeabe37da93b73bdd733a92b38effdac661827 | |
| parent | e34627f9c7c2dd6be939d01266d698152e21b91e (diff) | |
tools: Catch more argv_find() when not checked properly
Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
| -rw-r--r-- | tools/coccinelle/argv_find.cocci | 7 |
1 files changed, 7 insertions, 0 deletions
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 +) |
