Skip to content

Commit 5cc026e

Browse files
pcloudsgitster
authored andcommitted
connected.c: use error_errno()
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f0658ec commit 5cc026e

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

connected.c

+3-6
Original file line numberDiff line numberDiff line change
@@ -86,17 +86,14 @@ static int check_everything_connected_real(sha1_iterate_fn fn,
8686
memcpy(commit, sha1_to_hex(sha1), 40);
8787
if (write_in_full(rev_list.in, commit, 41) < 0) {
8888
if (errno != EPIPE && errno != EINVAL)
89-
error(_("failed write to rev-list: %s"),
90-
strerror(errno));
89+
error_errno(_("failed write to rev-list"));
9190
err = -1;
9291
break;
9392
}
9493
} while (!fn(cb_data, sha1));
9594

96-
if (close(rev_list.in)) {
97-
error(_("failed to close rev-list's stdin: %s"), strerror(errno));
98-
err = -1;
99-
}
95+
if (close(rev_list.in))
96+
err = error_errno(_("failed to close rev-list's stdin"));
10097

10198
sigchain_pop(SIGPIPE);
10299
return finish_command(&rev_list) || err;

0 commit comments

Comments
 (0)