transport-helper.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>

Nguyễn Thái Ngọc Duy committed May 8, 2016 at 16:47 UTC 1fee1dce711327811956bd78ad1f7270a3e2d824
1 file changed +3 -3
transport-helper.c
+3 -3
@@ -1166,7 +1166,7 @@ static int udt_do_read(struct unidirectional_transfer *t)
1166 bytes = read(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse);
1167 if (bytes < 0 && errno != EWOULDBLOCK && errno != EAGAIN &&
1168 errno != EINTR) {
1169 - error("read(%s) failed: %s", t->src_name, strerror(errno));
1169 + error_errno("read(%s) failed", t->src_name);
1170 return -1;
1171 } else if (bytes == 0) {
1172 transfer_debug("%s EOF (with %i bytes in buffer)",
@@ -1193,7 +1193,7 @@ static int udt_do_write(struct unidirectional_transfer *t)
1193 transfer_debug("%s is writable", t->dest_name);
1194 bytes = xwrite(t->dest, t->buf, t->bufuse);
1195 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);
1197 return -1;
1198 } else if (bytes > 0) {
1199 t->bufuse -= bytes;
@@ -1306,7 +1306,7 @@ static int tloop_join(pid_t pid, const char *name)
1306 {
1307 int tret;
1308 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);
1310 return 1;
1311 }
1312 if (!WIFEXITED(tret) || WEXITSTATUS(tret)) {