Skip to content

Commit 1fee1dc

Browse files
pcloudsgitster
authored andcommitted
transport-helper.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 7616c6c commit 1fee1dc

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

transport-helper.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ static int udt_do_read(struct unidirectional_transfer *t)
11661166
bytes = read(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse);
11671167
if (bytes < 0 && errno != EWOULDBLOCK && errno != EAGAIN &&
11681168
errno != EINTR) {
1169-
error("read(%s) failed: %s", t->src_name, strerror(errno));
1169+
error_errno("read(%s) failed", t->src_name);
11701170
return -1;
11711171
} else if (bytes == 0) {
11721172
transfer_debug("%s EOF (with %i bytes in buffer)",
@@ -1193,7 +1193,7 @@ static int udt_do_write(struct unidirectional_transfer *t)
11931193
transfer_debug("%s is writable", t->dest_name);
11941194
bytes = xwrite(t->dest, t->buf, t->bufuse);
11951195
if (bytes < 0 && errno != EWOULDBLOCK) {
1196-
error("write(%s) failed: %s", t->dest_name, strerror(errno));
1196+
error_errno("write(%s) failed", t->dest_name);
11971197
return -1;
11981198
} else if (bytes > 0) {
11991199
t->bufuse -= bytes;
@@ -1306,7 +1306,7 @@ static int tloop_join(pid_t pid, const char *name)
13061306
{
13071307
int tret;
13081308
if (waitpid(pid, &tret, 0) < 0) {
1309-
error("%s process failed to wait: %s", name, strerror(errno));
1309+
error_errno("%s process failed to wait", name);
13101310
return 1;
13111311
}
13121312
if (!WIFEXITED(tret) || WEXITSTATUS(tret)) {

0 commit comments

Comments
 (0)