aboutsummaryrefslogtreecommitdiff
path: root/index-pack.c
diff options
context:
space:
mode:
Diffstat (limited to 'index-pack.c')
-rw-r--r--index-pack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/index-pack.c b/index-pack.c
index 5f6d128a8..e9a530322 100644
--- a/index-pack.c
+++ b/index-pack.c
@@ -638,7 +638,7 @@ static void readjust_pack_header_and_sha1(unsigned char *sha1)
/* Rewrite pack header with updated object number */
if (lseek(output_fd, 0, SEEK_SET) != 0)
die("cannot seek back: %s", strerror(errno));
- if (xread(output_fd, &hdr, sizeof(hdr)) != sizeof(hdr))
+ if (read_in_full(output_fd, &hdr, sizeof(hdr)) != sizeof(hdr))
die("cannot read pack header back: %s", strerror(errno));
hdr.hdr_entries = htonl(nr_objects);
if (lseek(output_fd, 0, SEEK_SET) != 0)