diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-09-23 13:44:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-23 13:44:50 -0700 |
commit | b1b065ee35619a42df7381363ffd7096cf1b9a3d (patch) | |
tree | e2cf25dc8a98d23e2c769f24c8ab969b19055319 /builtin/index-pack.c | |
parent | Merge branch 'kz/revindex-comment-fix' (diff) | |
parent | index-pack: use xopen in init_thread (diff) | |
download | tgif-b1b065ee35619a42df7381363ffd7096cf1b9a3d.tar.xz |
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 'builtin/index-pack.c')
-rw-r--r-- | builtin/index-pack.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 8b52bea84d..7ce69c087e 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -188,9 +188,7 @@ static void init_thread(void) pthread_key_create(&key, NULL); CALLOC_ARRAY(thread_data, nr_threads); for (i = 0; i < nr_threads; i++) { - thread_data[i].pack_fd = open(curr_pack, O_RDONLY); - if (thread_data[i].pack_fd == -1) - die_errno(_("unable to open %s"), curr_pack); + thread_data[i].pack_fd = xopen(curr_pack, O_RDONLY); } threads_active = 1; |