]> git.ipfire.org Git - thirdparty/systemd.git/blob - coccinelle/hashmap_free.cocci
test: suppress logs generated by journal tests
[thirdparty/systemd.git] / coccinelle / hashmap_free.cocci
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;
10 @@
11 - if (p)
12 - set_free(p);
13 - p = NULL;
14 + p = set_free(p);
15 @@
16 expression p;
17 @@
18 - if (p) {
19 - set_free(p);
20 - p = NULL;
21 - }
22 + p = set_free(p);
23 @@
24 expression p;
25 @@
26 - if (p)
27 - set_free(p);
28 + set_free(p);
29 @@
30 expression p;
31 @@
32 - hashmap_free(p);
33 - p = NULL;
34 + p = hashmap_free(p);
35 @@
36 expression p;
37 @@
38 - if (p)
39 - hashmap_free(p);
40 - p = NULL;
41 + p = hashmap_free(p);
42 @@
43 expression p;
44 @@
45 - if (p) {
46 - hashmap_free(p);
47 - p = NULL;
48 - }
49 + p = hashmap_free(p);
50 @@
51 expression p;
52 @@
53 - if (p)
54 - hashmap_free(p);
55 + hashmap_free(p);