Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/git/blob/master/tools/coccinelle/xopen.cocci # git [Ported from github.com/git/git] Sync with Git 2.56.1 Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `git / tools / coccinelle / xopen.cocci` 19 lines ยท 295 bytes Raw Blame History 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(...); }