Skip to content

Commit 37653a1

Browse files
pcloudsgitster
authored andcommitted
copy.c: use error_errno()
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5cc026e commit 37653a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

copy.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,15 @@ int copy_file(const char *dst, const char *src, int mode)
4242
status = copy_fd(fdi, fdo);
4343
switch (status) {
4444
case COPY_READ_ERROR:
45-
error("copy-fd: read returned %s", strerror(errno));
45+
error_errno("copy-fd: read returned");
4646
break;
4747
case COPY_WRITE_ERROR:
48-
error("copy-fd: write returned %s", strerror(errno));
48+
error_errno("copy-fd: write returned");
4949
break;
5050
}
5151
close(fdi);
5252
if (close(fdo) != 0)
53-
return error("%s: close error: %s", dst, strerror(errno));
53+
return error_errno("%s: close error", dst);
5454

5555
if (!status && adjust_shared_perm(dst))
5656
return -1;

0 commit comments

Comments
 (0)