diff options
author | Nguyễn Thái Ngọc Duy <pclouds@gmail.com> | 2016-05-08 16:47:40 +0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2016-05-09 12:29:08 -0700 |
commit | 37653a130af87f9103cf710bbd018eb9078f4bf4 (patch) | |
tree | 7b7c4686637ac8d9ceabd36cb01c723c456948fb /copy.c | |
parent | 5cc026e218d0ad3962d10c0775fe9b5ac68eed09 (diff) | |
download | git-37653a130af87f9103cf710bbd018eb9078f4bf4.tar.gz |
copy.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 'copy.c')
-rw-r--r-- | copy.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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; |