summaryrefslogtreecommitdiffstats
path: root/tools/coccinelle/argv_find.cocci
blob: 1ab19b749b4eb2ff04bc2969f2fc2347e4c4d1a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
@@
identifier idx;
identifier argv;
identifier argc;
expression e1;
expression e2;
identifier I;
@@

(
- argv_find(argv, argc, e1, &idx);
  if (
-   idx
+   argv_find(argv, argc, e1, &idx)
  )
  {
    e2;
  }
|
- argv_find(argv, argc, e1, &idx);
... when != I = idx;
    when strict
)