From: Nguyễn Thái Ngọc Duy Date: Tue, 03 May 2016 12:03:52 GMT Subject: [PATCH v2 19/41] connected.c: use error_errno() Message-ID: <1462277054-5943-20-git-send-email-pclouds@gmail.com> In-Reply-To: <1462277054-5943-1-git-send-email-pclouds@gmail.com> Signed-off-by: Nguyễn Thái Ngọc Duy --- connected.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/connected.c b/connected.c index 299c560..bf1b12e 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; -- 2.8.0.rc0.210.gd302cd2