Subject: [PATCH 20/41] copy.c: use error_errno()

From: Nguyễn Thái Ngọc Duy <[email-masked]>
Date: Sun, 1 May 2016 18:14:36 +0700

Signed-off-by: Nguyễn Thái Ngọc Duy <[email-masked]>
---
 copy.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/copy.c b/copy.c
index 574fa1f..4de6a11 100644
--- a/copy.c
+++ b/copy.c
@@ -42,15 +42,15 @@ int copy_file(const char *dst, const char *src, int mode)
 	status = copy_fd(fdi, fdo);
 	switch (status) {
 	case COPY_READ_ERROR:
-		error("copy-fd: read returned %s", strerror(errno));
+		error_errno("copy-fd: read returned");
 		break;
 	case COPY_WRITE_ERROR:
-		error("copy-fd: write returned %s", strerror(errno));
+		error_errno("copy-fd: write returned");
 		break;
 	}
 	close(fdi);
 	if (close(fdo) != 0)
-		return error("%s: close error: %s", dst, strerror(errno));
+		return error_errno("%s: close error", dst);
 
 	if (!status && adjust_shared_perm(dst))
 		return -1;
-- 
2.8.0.rc0.210.gd302cd2