From a1f06be3ff78f088aa5e71cd518b74cdf5a4d34e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sun, 8 May 2016 16:47:42 +0700 Subject: [PATCH] diff-no-index.c: use error_errno() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- diff-no-index.c | 3 +-- 1 file changed, 1 insertion(+), 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);