summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-07-10 13:42:51 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-07-10 13:42:51 -0700
commitd73b46cfb5cd675e79ad61ba08e32b06d95f1a08 (patch)
tree511531b40347ac3de1fdf1a786e769ac75cceda3
parentMerge branch 'pw/unquote-path-in-git-pm' (diff)
parentcoccinelle: polish FREE_AND_NULL rules (diff)
downloadtgif-d73b46cfb5cd675e79ad61ba08e32b06d95f1a08.tar.xz
Merge branch 'rs/free-and-null'
Code cleanup. * rs/free-and-null: coccinelle: polish FREE_AND_NULL rules
-rw-r--r--contrib/coccinelle/free.cocci10
1 files changed, 1 insertions, 9 deletions
diff --git a/contrib/coccinelle/free.cocci b/contrib/coccinelle/free.cocci
index f2d97e755b..4490069df9 100644
--- a/contrib/coccinelle/free.cocci
+++ b/contrib/coccinelle/free.cocci
@@ -11,16 +11,8 @@ expression E;
free(E);
@@
-type T;
-T *ptr;
-@@
-- free(ptr);
-- ptr = NULL;
-+ FREE_AND_NULL(ptr);
-
-@@
expression E;
@@
- free(E);
-- E = NULL;
+ FREE_AND_NULL(E);
+- E = NULL;