Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2016-05-08 12:47:39 +0300
committerJunio C Hamano <gitster@pobox.com>2016-05-09 22:29:08 +0300
commit5cc026e218d0ad3962d10c0775fe9b5ac68eed09 (patch)
treec48d6cd843603c5180e97651fb6ea6effb8226b2 /connected.c
parentf0658ec9ea996f993e3665786b3f5ac0b92179e2 (diff)
connected.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>
Diffstat (limited to 'connected.c')
-rw-r--r--connected.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/connected.c b/connected.c
index 299c56090b..bf1b12e7ec 100644
--- 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)
- error(_("failed write to rev-list: %s"),
- strerror(errno));
+ error_errno(_("failed write to rev-list"));
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;