From e2bbf175a2184bd76f6c54ccf8456babeb1a46fc Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 9 Apr 2024 15:16:35 +0200 Subject: Adding upstream version 9.1. Signed-off-by: Daniel Baumann --- tools/coccinelle/argv_find.cocci | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 tools/coccinelle/argv_find.cocci (limited to 'tools/coccinelle/argv_find.cocci') diff --git a/tools/coccinelle/argv_find.cocci b/tools/coccinelle/argv_find.cocci new file mode 100644 index 0000000..1ab19b7 --- /dev/null +++ b/tools/coccinelle/argv_find.cocci @@ -0,0 +1,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 +) -- cgit v1.2.3