git/contrib/coccinelle/xstrdup_or_null.cocci

14 строки
161 B
Plaintext

@@
expression E;
expression V;
@@
- if (E)
- V = xstrdup(E);
+ V = xstrdup_or_null(E);
@@
expression E;
@@
- xstrdup(absolute_path(E))
+ absolute_pathdup(E)