worktree: simplify incompatibility message for --orphan and commit-ish
[git/gitster.git] / contrib / coccinelle / xopen.cocci
blobb71db670194c8025d5cb4c9c52a2c1faa90e342e
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(...); }
12 expression fd;
13 identifier die_fn =~ "^(die|die_errno)$";
15   fd =
16 - open
17 + xopen
18   (...);
19 - if ( \( fd < 0 \| fd == -1 \) ) { die_fn(...); }