summaryrefslogtreecommitdiff
path: root/diff-no-index.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-05-08 16:47:42 +0700
committerJunio C Hamano <gitster@pobox.com>2016-05-09 12:29:08 -0700
commita1f06be3ff78f088aa5e71cd518b74cdf5a4d34e (patch)
treeebbf0399594ac18080c3792bcaf8677212aa191d /diff-no-index.c
parent26604f9f621b7b5710309671168d98722b8f5f33 (diff)
downloadgit-a1f06be3ff78f088aa5e71cd518b74cdf5a4d34e.tar.gz
diff-no-index.c: use error_errno()
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 'diff-no-index.c')
-rw-r--r--diff-no-index.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/diff-no-index.c b/diff-no-index.c
index 03daadb25a..1f8999b9ca 100644
--- a/diff-no-index.c
+++ b/diff-no-index.c
@@ -65,8 +65,7 @@ static int populate_from_stdin(struct diff_filespec *s)
size_t size = 0;
if (strbuf_read(&buf, 0, 0) < 0)
- return error("error while reading from stdin %s",
- strerror(errno));
+ return error_errno("error while reading from stdin");
s->should_munmap = 0;
s->data = strbuf_detach(&buf, &size);