summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2017-02-02 13:36:55 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-02-02 13:36:55 -0800
commit6f1c08bdb75b37ad30103f0f12339780fdc004e2 (patch)
tree3a6909ffaaa512519c3f6f6e7a11f0956276bcd1 /contrib
parentMerge branch 'js/unzip-in-usr-bin-workaround' (diff)
parentuse absolute_pathdup() (diff)
downloadtgif-6f1c08bdb75b37ad30103f0f12339780fdc004e2.tar.xz
Merge branch 'rs/absolute-pathdup'
Code cleanup. * rs/absolute-pathdup: use absolute_pathdup() abspath: add absolute_pathdup()
Diffstat (limited to 'contrib')
-rw-r--r--contrib/coccinelle/xstrdup_or_null.cocci6
1 files changed, 6 insertions, 0 deletions
diff --git a/contrib/coccinelle/xstrdup_or_null.cocci b/contrib/coccinelle/xstrdup_or_null.cocci
index 3fceef132b..8e05d1ca4b 100644
--- a/contrib/coccinelle/xstrdup_or_null.cocci
+++ b/contrib/coccinelle/xstrdup_or_null.cocci
@@ -5,3 +5,9 @@ expression V;
- if (E)
- V = xstrdup(E);
+ V = xstrdup_or_null(E);
+
+@@
+expression E;
+@@
+- xstrdup(absolute_path(E))
++ absolute_pathdup(E)