about summary refs log tree commit diff
path: root/third_party/git/contrib/coccinelle/xstrdup_or_null.cocci
@@
expression E;
expression V;
@@
- if (E)
-    V = xstrdup(E);
+ V = xstrdup_or_null(E);

@@
expression E;
@@
- xstrdup(absolute_path(E))
+ absolute_pathdup(E)