diff options
author | Daniel Mack <github@zonque.org> | 2015-09-10 13:46:14 +0200 |
---|---|---|
committer | Daniel Mack <github@zonque.org> | 2015-09-10 13:46:14 +0200 |
commit | f33be3119806f96898dda6ade492fbdcdf8f79b8 (patch) | |
tree | 3c470fb770c5a19f848df0487f01af89b0aa6bea /coccinelle/strv_free.cocci | |
parent | 89921f6ed085d77225204e160ce2cee99ed0c6fa (diff) | |
parent | 525d3cc746a037e8cc6b2e0ebaaf76a51856fa6b (diff) |
Merge pull request #1226 from poettering/coccinelle-fixes3
Third round of Coccinelle fixes
Diffstat (limited to 'coccinelle/strv_free.cocci')
-rw-r--r-- | coccinelle/strv_free.cocci | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/coccinelle/strv_free.cocci b/coccinelle/strv_free.cocci new file mode 100644 index 0000000000..0ad56f772f --- /dev/null +++ b/coccinelle/strv_free.cocci @@ -0,0 +1,27 @@ +@@ +expression p; +@@ +- strv_free(p); +- p = NULL; ++ p = strv_free(p); +@@ +expression p; +@@ +- if (p) +- strv_free(p); +- p = NULL; ++ p = strv_free(p); +@@ +expression p; +@@ +- if (p) { +- strv_free(p); +- p = NULL; +- } ++ p = strv_free(p); +@@ +expression p; +@@ +- if (p) +- strv_free(p); ++ strv_free(p); |