Merge branch 'jt/use-trailer-api-in-commands' into maint
[gitweb.git] / contrib / coccinelle / xstrdup_or_null.cocci
index 3fceef132bf57623e04a080d03da9aff951f1c11..8e05d1ca4b61b9792a6f7cc4e7d322efeab02e01 100644 (file)
@@ -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)