1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-01 17:51:22 +03:00
systemd/coccinelle/strv_free.cocci
Lennart Poettering 6796073e33 tree-wide: make use of the fact that strv_free() returns NULL
Another Coccinelle patch.
2015-09-09 23:05:58 +02:00

28 lines
321 B
Plaintext

@@
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);