Commit 23e7a312 authored by Duy Nguyen's avatar Duy Nguyen Committed by Junio C Hamano

bisect.c: use die_errno() and warning_errno()

Signed-off-by: Duy Nguyen's avatarNguyễn Thái Ngọc Duy <[email protected]>
Signed-off-by: default avatarJunio C Hamano <[email protected]>
parent fd1d6723
......@@ -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:
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment