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>

Nguyễn Thái Ngọc Duy committed May 8, 2016 at 16:47 UTC 23e7a312e115e4cbeda3d944b8020e014f0f908a
1 file changed +3 -4
bisect.c
+3 -4
@@ -860,8 +860,8 @@ static void check_good_are_ancestors_of_bad(const char *prefix, int no_checkout)
860 /* Create file BISECT_ANCESTORS_OK. */
861 fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY, 0600);
862 if (fd < 0)
863 - warning("could not create file '%s': %s",
864 - filename, strerror(errno));
863 + warning_errno("could not create file '%s'",
864 + filename);
865 else
866 close(fd);
867 done:
@@ -910,8 +910,7 @@ void read_bisect_terms(const char **read_bad, const char **read_good)
910 *read_good = "good";
911 return;
912 } else {
913 - die("could not read file '%s': %s", filename,
914 - strerror(errno));
913 + die_errno("could not read file '%s'", filename);
914 }
915 } else {
916 strbuf_getline_lf(&str, fp);