Skip to content

Commit

Permalink
bisect.c: use die_errno() and warning_errno()
Browse files Browse the repository at this point in the history
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
pclouds authored and gitster committed May 9, 2016
1 parent fd1d672 commit 23e7a31
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions bisect.c
Original file line number Diff line number Diff line change
Expand Up @@ -860,8 +860,8 @@ static void check_good_are_ancestors_of_bad(const char *prefix, int no_checkout)
/* Create file BISECT_ANCESTORS_OK. */
fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY, 0600);
if (fd < 0)
warning("could not create file '%s': %s",
filename, strerror(errno));
warning_errno("could not create file '%s'",
filename);
else
close(fd);
done:
Expand Down Expand Up @@ -910,8 +910,7 @@ void read_bisect_terms(const char **read_bad, const char **read_good)
*read_good = "good";
return;
} else {
die("could not read file '%s': %s", filename,
strerror(errno));
die_errno("could not read file '%s'", filename);
}
} else {
strbuf_getline_lf(&str, fp);
Expand Down

0 comments on commit 23e7a31

Please sign in to comment.