summaryrefslogtreecommitdiff
path: root/xdiff-interface.c
diff options
context:
space:
mode:
authorLibravatar Nguyễn Thái Ngọc Duy <pclouds@gmail.com>2017-05-03 17:16:55 +0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2017-05-26 12:33:56 +0900
commit5118d7f4e6e00b7eac3ce08a16392a732edc0b2b (patch)
tree57f4cb50b70b89d89e40d2fec38a542dc628d006 /xdiff-interface.c
parentwrapper.c: make warn_on_inaccessible() static (diff)
downloadtgif-5118d7f4e6e00b7eac3ce08a16392a732edc0b2b.tar.xz
print errno when reporting a system call error
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'xdiff-interface.c')
-rw-r--r--xdiff-interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/xdiff-interface.c b/xdiff-interface.c
index 060038c2d6..d3f78ca2a7 100644
--- a/xdiff-interface.c
+++ b/xdiff-interface.c
@@ -164,9 +164,9 @@ int read_mmfile(mmfile_t *ptr, const char *filename)
size_t sz;
if (stat(filename, &st))
- return error("Could not stat %s", filename);
+ return error_errno("Could not stat %s", filename);
if ((f = fopen(filename, "rb")) == NULL)
- return error("Could not open %s", filename);
+ return error_errno("Could not open %s", filename);
sz = xsize_t(st.st_size);
ptr->ptr = xmalloc(sz ? sz : 1);
if (sz && fread(ptr->ptr, sz, 1, f) != 1) {