summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-09-23 20:44:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-09-23 20:44:50 (GMT)
commitb1b065ee35619a42df7381363ffd7096cf1b9a3d (patch)
treee2cf25dc8a98d23e2c769f24c8ab969b19055319 /contrib
parentd1e376d2f95e718d29a6ef22377853f033d4d2f2 (diff)
parent6346f704a00a2fc94cc2ca26dbe872b446500bfd (diff)
downloadgit-b1b065ee35619a42df7381363ffd7096cf1b9a3d.zip
git-b1b065ee35619a42df7381363ffd7096cf1b9a3d.tar.gz
git-b1b065ee35619a42df7381363ffd7096cf1b9a3d.tar.bz2
Merge branch 'rs/use-xopen-in-index-pack'
Code clean-up. * rs/use-xopen-in-index-pack: index-pack: use xopen in init_thread
Diffstat (limited to 'contrib')
-rw-r--r--contrib/coccinelle/xopen.cocci13
1 files changed, 8 insertions, 5 deletions
diff --git a/contrib/coccinelle/xopen.cocci b/contrib/coccinelle/xopen.cocci
index 814d7b8..b71db67 100644
--- a/contrib/coccinelle/xopen.cocci
+++ b/contrib/coccinelle/xopen.cocci
@@ -2,15 +2,18 @@
identifier fd;
identifier die_fn =~ "^(die|die_errno)$";
@@
-(
- fd =
+ int fd =
- open
+ xopen
(...);
-|
- int fd =
+- 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(...); }