Skip to content

Commit

Permalink
copy.c: use error_errno()
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
pclouds authored and gitster committed May 9, 2016
1 parent 5cc026e commit 37653a1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions copy.c
Expand Up @@ -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;
Expand Down

0 comments on commit 37653a1

Please sign in to comment.