about summary refs log tree commit diff
path: root/third_party/git/contrib/coccinelle/flex_alloc.cocci
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/contrib/coccinelle/flex_alloc.cocci')
-rw-r--r--third_party/git/contrib/coccinelle/flex_alloc.cocci13
1 files changed, 13 insertions, 0 deletions
diff --git a/third_party/git/contrib/coccinelle/flex_alloc.cocci b/third_party/git/contrib/coccinelle/flex_alloc.cocci
new file mode 100644
index 000000000000..e9f7f6d861a4
--- /dev/null
+++ b/third_party/git/contrib/coccinelle/flex_alloc.cocci
@@ -0,0 +1,13 @@
+@@
+expression str;
+identifier x, flexname;
+@@
+- FLEX_ALLOC_MEM(x, flexname, str, strlen(str));
++ FLEX_ALLOC_STR(x, flexname, str);
+
+@@
+expression str;
+identifier x, ptrname;
+@@
+- FLEXPTR_ALLOC_MEM(x, ptrname, str, strlen(str));
++ FLEXPTR_ALLOC_STR(x, ptrname, str);