1:255.13-alt1
[systemd_ALT.git] / coccinelle / hashmap_free.cocci
blob31e1279ac0aed8811e37a3bf1170c52e166bb14c
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
2 @@
3 expression p;
4 @@
5 - set_free(p);
6 - p = NULL;
7 + p = set_free(p);
8 @@
9 expression p;
11 - if (p)
12 -         set_free(p);
13 - p = NULL;
14 + p = set_free(p);
16 expression p;
18 - if (p) {
19 -         set_free(p);
20 -         p = NULL;
21 - }
22 + p = set_free(p);
24 expression p;
26 - if (p)
27 -         set_free(p);
28 + set_free(p);
30 expression p;
32 - hashmap_free(p);
33 - p = NULL;
34 + p = hashmap_free(p);
36 expression p;
38 - if (p)
39 -         hashmap_free(p);
40 - p = NULL;
41 + p = hashmap_free(p);
43 expression p;
45 - if (p) {
46 -         hashmap_free(p);
47 -         p = NULL;
48 - }
49 + p = hashmap_free(p);
51 expression p;
53 - if (p)
54 -         hashmap_free(p);
55 + hashmap_free(p);