https://github.com/git/git
Raw File
Tip revision: 0d1bd1dfb37ef25e1911777c94129fc769ffec38 authored by Johannes Schindelin on 23 March 2023, 09:21:41 UTC
Git 2.40.1
Tip revision: 0d1bd1d
xopen.cocci
@@
identifier fd;
identifier die_fn =~ "^(die|die_errno)$";
@@
  int fd =
- open
+ xopen
  (...);
- if ( \( fd < 0 \| fd == -1 \) ) { die_fn(...); }

@@
expression fd;
identifier die_fn =~ "^(die|die_errno)$";
@@
  fd =
- open
+ xopen
  (...);
- if ( \( fd < 0 \| fd == -1 \) ) { die_fn(...); }
back to top