Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
transport-helper.c: use error_errno()
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sun, 8 May 2016 09:47:57 +0000
(16:47 +0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 9 May 2016 19:29:08 +0000
(12:29 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
transport-helper.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
7616c6c
)
diff --git
a/transport-helper.c
b/transport-helper.c
index b934183236ca571093f55818f5018c278150e274..f09fadcb194c2c0d39e8ddef4987c68184ee02e9 100644
(file)
--- a/
transport-helper.c
+++ b/
transport-helper.c
@@
-1166,7
+1166,7
@@
static int udt_do_read(struct unidirectional_transfer *t)
bytes = read(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse);
if (bytes < 0 && errno != EWOULDBLOCK && errno != EAGAIN &&
errno != EINTR) {
bytes = read(t->src, t->buf + t->bufuse, BUFFERSIZE - t->bufuse);
if (bytes < 0 && errno != EWOULDBLOCK && errno != EAGAIN &&
errno != EINTR) {
- error
("read(%s) failed: %s", t->src_name, strerror(errno)
);
+ error
_errno("read(%s) failed", t->src_name
);
return -1;
} else if (bytes == 0) {
transfer_debug("%s EOF (with %i bytes in buffer)",
return -1;
} else if (bytes == 0) {
transfer_debug("%s EOF (with %i bytes in buffer)",
@@
-1193,7
+1193,7
@@
static int udt_do_write(struct unidirectional_transfer *t)
transfer_debug("%s is writable", t->dest_name);
bytes = xwrite(t->dest, t->buf, t->bufuse);
if (bytes < 0 && errno != EWOULDBLOCK) {
transfer_debug("%s is writable", t->dest_name);
bytes = xwrite(t->dest, t->buf, t->bufuse);
if (bytes < 0 && errno != EWOULDBLOCK) {
- error
("write(%s) failed: %s", t->dest_name, strerror(errno)
);
+ error
_errno("write(%s) failed", t->dest_name
);
return -1;
} else if (bytes > 0) {
t->bufuse -= bytes;
return -1;
} else if (bytes > 0) {
t->bufuse -= bytes;
@@
-1306,7
+1306,7
@@
static int tloop_join(pid_t pid, const char *name)
{
int tret;
if (waitpid(pid, &tret, 0) < 0) {
{
int tret;
if (waitpid(pid, &tret, 0) < 0) {
- error
("%s process failed to wait: %s", name, strerror(errno)
);
+ error
_errno("%s process failed to wait", name
);
return 1;
}
if (!WIFEXITED(tret) || WEXITSTATUS(tret)) {
return 1;
}
if (!WIFEXITED(tret) || WEXITSTATUS(tret)) {