summaryrefslogtreecommitdiff
path: root/contrib/coccinelle
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2016-10-17 20:25:21 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-10-17 20:25:21 (GMT)
commit69e6544998892a2bd3c785cd238c786da40cf6a3 (patch)
tree5226289723f43db878429658b27a89b4ad23ee57 /contrib/coccinelle
parent9424bf27079a1262e42a2330283f7ab6c805267a (diff)
parenta94bb683970a111b467a36590ca36e52754ad504 (diff)
downloadgit-69e6544998892a2bd3c785cd238c786da40cf6a3.zip
git-69e6544998892a2bd3c785cd238c786da40cf6a3.tar.gz
git-69e6544998892a2bd3c785cd238c786da40cf6a3.tar.bz2
Merge branch 'rs/cocci'
Code cleanup. * rs/cocci: use strbuf_add_unique_abbrev() for adding short hashes, part 3 remove unnecessary NULL check before free(3)
Diffstat (limited to 'contrib/coccinelle')
-rw-r--r--contrib/coccinelle/free.cocci5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/coccinelle/free.cocci b/contrib/coccinelle/free.cocci
new file mode 100644
index 0000000..e282131
--- /dev/null
+++ b/contrib/coccinelle/free.cocci
@@ -0,0 +1,5 @@
+@@
+expression E;
+@@
+- if (E)
+ free(E);