Sync with 2.20.5
[git/debian.git] / contrib / coccinelle / xstrdup_or_null.cocci
blob8e05d1ca4b61b9792a6f7cc4e7d322efeab02e01
1 @@
2 expression E;
3 expression V;
4 @@
5 - if (E)
6 -    V = xstrdup(E);
7 + V = xstrdup_or_null(E);
9 @@
10 expression E;
12 - xstrdup(absolute_path(E))
13 + absolute_pathdup(E)