Welcome to mirror list, hosted at ThFree Co, Russian Federation.

xstrdup_or_null.cocci « coccinelle « contrib - git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3fceef132bf57623e04a080d03da9aff951f1c11 (plain)
1
2
3
4
5
6
7
@@
expression E;
expression V;
@@
- if (E)
-    V = xstrdup(E);
+ V = xstrdup_or_null(E);