]> git.ipfire.org Git - thirdparty/systemd.git/blob - coccinelle/hashmap_free.cocci
test: Disable LUKS devices from initramfs in QEMU tests
[thirdparty/systemd.git] / coccinelle / hashmap_free.cocci
1 @@
2 expression p;
3 @@
4 - set_free(p);
5 - p = NULL;
6 + p = set_free(p);
7 @@
8 expression p;
9 @@
10 - if (p)
11 - set_free(p);
12 - p = NULL;
13 + p = set_free(p);
14 @@
15 expression p;
16 @@
17 - if (p) {
18 - set_free(p);
19 - p = NULL;
20 - }
21 + p = set_free(p);
22 @@
23 expression p;
24 @@
25 - if (p)
26 - set_free(p);
27 + set_free(p);
28 @@
29 expression p;
30 @@
31 - hashmap_free(p);
32 - p = NULL;
33 + p = hashmap_free(p);
34 @@
35 expression p;
36 @@
37 - if (p)
38 - hashmap_free(p);
39 - p = NULL;
40 + p = hashmap_free(p);
41 @@
42 expression p;
43 @@
44 - if (p) {
45 - hashmap_free(p);
46 - p = NULL;
47 - }
48 + p = hashmap_free(p);
49 @@
50 expression p;
51 @@
52 - if (p)
53 - hashmap_free(p);
54 + hashmap_free(p);