Skip to content

Commit 23e7a31

Browse files
pcloudsgitster
authored andcommitted
bisect.c: use die_errno() and warning_errno()
Signed-off-by: Nguyễn Thái Ngọc Duy <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent fd1d672 commit 23e7a31

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

bisect.c

+3-4
Original file line numberDiff line numberDiff line change
@@ -860,8 +860,8 @@ static void check_good_are_ancestors_of_bad(const char *prefix, int no_checkout)
860860
/* Create file BISECT_ANCESTORS_OK. */
861861
fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY, 0600);
862862
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);
865865
else
866866
close(fd);
867867
done:
@@ -910,8 +910,7 @@ void read_bisect_terms(const char **read_bad, const char **read_good)
910910
*read_good = "good";
911911
return;
912912
} else {
913-
die("could not read file '%s': %s", filename,
914-
strerror(errno));
913+
die_errno("could not read file '%s'", filename);
915914
}
916915
} else {
917916
strbuf_getline_lf(&str, fp);

0 commit comments

Comments
 (0)