Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
connected.c: use error_errno()
author
Nguyễn Thái Ngọc Duy
<pclouds@gmail.com>
Sun, 8 May 2016 09:47:39 +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>
connected.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
f0658ec
)
diff --git
a/connected.c
b/connected.c
index 299c56090bc38b1572b0ac03ec48532f40de605f..bf1b12e7ecaf476304811cabc870d58fc7f3f1dd 100644
(file)
--- a/
connected.c
+++ b/
connected.c
@@
-86,17
+86,14
@@
static int check_everything_connected_real(sha1_iterate_fn fn,
memcpy(commit, sha1_to_hex(sha1), 40);
if (write_in_full(rev_list.in, commit, 41) < 0) {
if (errno != EPIPE && errno != EINVAL)
memcpy(commit, sha1_to_hex(sha1), 40);
if (write_in_full(rev_list.in, commit, 41) < 0) {
if (errno != EPIPE && errno != EINVAL)
- error(_("failed write to rev-list: %s"),
- strerror(errno));
+ error_errno(_("failed write to rev-list"));
err = -1;
break;
}
} while (!fn(cb_data, sha1));
err = -1;
break;
}
} while (!fn(cb_data, sha1));
- if (close(rev_list.in)) {
- error(_("failed to close rev-list's stdin: %s"), strerror(errno));
- err = -1;
- }
+ if (close(rev_list.in))
+ err = error_errno(_("failed to close rev-list's stdin"));
sigchain_pop(SIGPIPE);
return finish_command(&rev_list) || err;
sigchain_pop(SIGPIPE);
return finish_command(&rev_list) || err;