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

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
maint
Nguyễn Thái Ngọc Duy 2016-05-08 16:47:23 +07:00 committed by Junio C Hamano
parent fd1d672300
commit 23e7a312e1
1 changed files with 3 additions and 4 deletions

View File

@ -860,8 +860,8 @@ static void check_good_are_ancestors_of_bad(const char *prefix, int no_checkout)
/* Create file BISECT_ANCESTORS_OK. */ /* Create file BISECT_ANCESTORS_OK. */
fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY, 0600); fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY, 0600);
if (fd < 0) if (fd < 0)
warning("could not create file '%s': %s", warning_errno("could not create file '%s'",
filename, strerror(errno)); filename);
else else
close(fd); close(fd);
done: done:
@ -910,8 +910,7 @@ void read_bisect_terms(const char **read_bad, const char **read_good)
*read_good = "good"; *read_good = "good";
return; return;
} else { } else {
die("could not read file '%s': %s", filename, die_errno("could not read file '%s'", filename);
strerror(errno));
} }
} else { } else {
strbuf_getline_lf(&str, fp); strbuf_getline_lf(&str, fp);