systemd/coccinelle/strv_free.cocci

29 lines
370 B
Plaintext
Raw Normal View History

2023-04-12 17:00:04 +08:00
/* SPDX-License-Identifier: LGPL-2.1-or-later */
2022-05-14 02:56:24 +08:00
@@
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);