From 43c728e2c2fe81cf401f39a60ab167a9ed542428 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nguy=E1=BB=85n=20Th=C3=A1i=20Ng=E1=BB=8Dc=20Duy?= Date: Sun, 8 May 2016 16:47:58 +0700 Subject: [PATCH] unpack-trees.c: use error_errno() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy Signed-off-by: Junio C Hamano --- unpack-trees.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/unpack-trees.c b/unpack-trees.c index 9f55cc28b9..bb0d14210c 100644 --- a/unpack-trees.c +++ b/unpack-trees.c @@ -1499,8 +1499,7 @@ static int verify_absent_1(const struct cache_entry *ce, path = xmemdupz(ce->name, len); if (lstat(path, &st)) - ret = error("cannot stat '%s': %s", path, - strerror(errno)); + ret = error_errno("cannot stat '%s'", path); else ret = check_ok_to_remove(path, len, DT_UNKNOWN, NULL, &st, error_type, o); @@ -1508,8 +1507,7 @@ static int verify_absent_1(const struct cache_entry *ce, return ret; } else if (lstat(ce->name, &st)) { if (errno != ENOENT) - return error("cannot stat '%s': %s", ce->name, - strerror(errno)); + return error_errno("cannot stat '%s'", ce->name); return 0; } else { return check_ok_to_remove(ce->name, ce_namelen(ce), -- 2.43.2