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
/
safe_fclose.cocci
blob
fc1b584d88f3b38047ea3b81c1a82b1bd50161ab
1
/* SPDX-License-Identifier: LGPL-2.1-or-later */
2
@@
3
expression p;
4
@@
5
- if (p) {
6
- fclose(p);
7
- p = NULL;
8
- }
9
+ p = safe_fclose(p);
10
@@
11
expression p;
12
@@
13
- if (p)
14
- fclose(p);
15
- p = NULL;
16
+ p = safe_fclose(p);
17
@@
18
expression p;
19
@@
20
- fclose(p);
21
- p = NULL;
22
+ p = safe_fclose(p);
23
@@
24
expression p;
25
@@
26
- if (p)
27
- fclose(p);
28
+ safe_fclose(p);