Systemd/coccinelle/strv_free.cocci

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