diff options
Diffstat (limited to 'pack-write.c')
-rw-r--r-- | pack-write.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/pack-write.c b/pack-write.c index 665e2b29b8..c66c8af725 100644 --- a/pack-write.c +++ b/pack-write.c @@ -183,7 +183,6 @@ void fixup_pack_header_footer(int pack_fd, char *index_pack_lockfile(int ip_out) { - int len, s; char packname[46]; /* @@ -193,11 +192,8 @@ char *index_pack_lockfile(int ip_out) * case, we need it to remove the corresponding .keep file * later on. If we don't get that then tough luck with it. */ - for (len = 0; - len < 46 && (s = xread(ip_out, packname+len, 46-len)) > 0; - len += s); - if (len == 46 && packname[45] == '\n' && - memcmp(packname, "keep\t", 5) == 0) { + if (read_in_full(ip_out, packname, 46) == 46 && packname[45] == '\n' && + memcmp(packname, "keep\t", 5) == 0) { char path[PATH_MAX]; packname[45] = 0; snprintf(path, sizeof(path), "%s/pack/pack-%s.keep", |