repo.or.cz
/
git
/
gitster.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
worktree: simplify incompatibility message for --orphan and commit-ish
[git/gitster.git]
/
contrib
/
coccinelle
/
xopen.cocci
blob
b71db670194c8025d5cb4c9c52a2c1faa90e342e
1
@@
2
identifier fd;
3
identifier die_fn =~ "^(die|die_errno)$";
4
@@
5
int fd =
6
- open
7
+ xopen
8
(...);
9
- if ( \( fd < 0 \| fd == -1 \) ) { die_fn(...); }
10
11
@@
12
expression fd;
13
identifier die_fn =~ "^(die|die_errno)$";
14
@@
15
fd =
16
- open
17
+ xopen
18
(...);
19
- if ( \( fd < 0 \| fd == -1 \) ) { die_fn(...); }