diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-03-19 15:25:39 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-03-19 15:25:39 -0700 |
commit | bfcc6e2a68b95ee71fc606a2e3917af78f1130f9 (patch) | |
tree | 30a225e537754d8b2579304d9872b0374be18c73 /contrib/coccinelle | |
parent | Merge branch 'ah/make-fuzz-all-doc-update' (diff) | |
parent | fix xcalloc() argument order (diff) | |
download | tgif-bfcc6e2a68b95ee71fc606a2e3917af78f1130f9.tar.xz |
Merge branch 'rs/xcalloc-takes-nelem-first'
Code cleanup.
* rs/xcalloc-takes-nelem-first:
fix xcalloc() argument order
Diffstat (limited to 'contrib/coccinelle')
-rw-r--r-- | contrib/coccinelle/xcalloc.cocci | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/coccinelle/xcalloc.cocci b/contrib/coccinelle/xcalloc.cocci new file mode 100644 index 0000000000..c291011607 --- /dev/null +++ b/contrib/coccinelle/xcalloc.cocci @@ -0,0 +1,10 @@ +@@ +type T; +T *ptr; +expression n; +@@ + xcalloc( ++ n, + \( sizeof(T) \| sizeof(*ptr) \) +- , n + ) |