Save errno before close(fd) for strerror in die(). Signed-off-by: Alex Riesen <raa.lkml@gmail.com> --- a/read-cache.c 2005-10-03 09:16:31.000000000 +0200 +++ b/read-cache.c 2005-10-07 23:23:40.000000000 +0200 @@ -482,9 +482,10 @@ int read_cache(void) if (size >= sizeof(struct cache_header) + 20) map = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); } + i = errno; close(fd); if (map == MAP_FAILED) - die("index file mmap failed (%s)", strerror(errno)); + die("index file mmap failed (%s)", strerror(i)); hdr = map; if (verify_hdr(hdr, size) < 0) - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.htmlReceived on Sat Oct 08 07:46:38 2005
This archive was generated by hypermail 2.1.8 : 2005-10-08 07:46:42 EST