repo.or.cz
/
systemd_ALT.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
1:255.13-alt1
[systemd_ALT.git]
/
coccinelle
/
hashmap_free.cocci
blob
31e1279ac0aed8811e37a3bf1170c52e166bb14c
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);