index-pack: use xopen in init_thread
commit6346f704a00a2fc94cc2ca26dbe872b446500bfd
authorRené Scharfe <l.s.r@web.de>
Fri, 10 Sep 2021 20:25:50 +0000 (10 22:25 +0200)
committerJunio C Hamano <gitster@pobox.com>
Fri, 10 Sep 2021 21:22:50 +0000 (10 14:22 -0700)
treea3f475493afe4eed7318ceaa34737ddd18f1b0b4
parent66e905b7dd0f4e9dd576be681f30fbaeeb19ec4a
index-pack: use xopen in init_thread

Support an arbitrary file descriptor expression in the semantic patch
for replacing open+die_errno with xopen, not just an identifier, and
apply it.  This makes the error message at the single affected place
more consistent and reduces code duplication.

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/index-pack.c
contrib/coccinelle/xopen.cocci