projects
/
haproxy-2.5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec4a875
)
DEV: coccinelle: Add xalloc_cast.cocci
author
Tim Duesterhus
<tim@bastelstu.be>
Wed, 15 Sep 2021 11:58:47 +0000
(13:58 +0200)
committer
Willy Tarreau
<w@1wt.eu>
Fri, 17 Sep 2021 15:22:05 +0000
(17:22 +0200)
This remove's C++ style casts from the return value of malloc/calloc.
see
403fd722ace1d98d3cfe17bbee1382bf58040466
dev/coccinelle/xalloc_cast.cocci
[new file with mode: 0644]
patch
|
blob
diff --git a/dev/coccinelle/xalloc_cast.cocci
b/dev/coccinelle/xalloc_cast.cocci
new file mode 100644
(file)
index 0000000..
75baa00
--- /dev/null
+++ b/
dev/coccinelle/xalloc_cast.cocci
@@ -0,0
+1,11
@@
+@@
+type T;
+@@
+
+- (T*)
+(
+malloc
+|
+calloc
+)
+ (...)