diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-07-10 13:42:51 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-07-10 13:42:51 -0700 |
commit | d73b46cfb5cd675e79ad61ba08e32b06d95f1a08 (patch) | |
tree | 511531b40347ac3de1fdf1a786e769ac75cceda3 | |
parent | Merge branch 'pw/unquote-path-in-git-pm' (diff) | |
parent | coccinelle: polish FREE_AND_NULL rules (diff) | |
download | tgif-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.cocci | 10 |
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; |