hdr.hdr_signature = htonl(PACK_SIGNATURE);
hdr.hdr_version = htonl(PACK_VERSION);
hdr.hdr_entries = htonl(nr_entries);
- if (sha1write(f, &hdr, sizeof(hdr)))
- return 0;
+ sha1write(f, &hdr, sizeof(hdr));
return sizeof(hdr);
}
if (rename(idx_tmp_name, name_buffer))
die_errno("unable to rename temporary index file");
+ *end_of_name_prefix = '\0';
+
free((void *)idx_tmp_name);
}