aboutsummaryrefslogtreecommitdiffstats
path: root/bisect.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-07-06 09:39:46 -0700
committerJunio C Hamano <gitster@pobox.com>2009-07-06 09:39:46 -0700
commitdd787c19c4f011cc3adb422ef856f2c58d989640 (patch)
tree1b8fdfb2e14cc423a31ab1ce75c6f05226483da6 /bisect.c
parent864cd9491772367b3ce5b0dda98f068e5bd49680 (diff)
parent0721c314a5c8fddc877140ab5a333c42c62f780d (diff)
downloadgit-dd787c19c4f011cc3adb422ef856f2c58d989640.tar.gz
Merge branch 'tr/die_errno'
* tr/die_errno: Use die_errno() instead of die() when checking syscalls Convert existing die(..., strerror(errno)) to die_errno() die_errno(): double % in strerror() output just in case Introduce die_errno() that appends strerror(errno) to die()
Diffstat (limited to 'bisect.c')
-rw-r--r--bisect.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/bisect.c b/bisect.c
index 52220df751..7f20acb4b9 100644
--- a/bisect.c
+++ b/bisect.c
@@ -461,7 +461,7 @@ static void read_bisect_paths(struct argv_array *array)
FILE *fp = fopen(filename, "r");
if (!fp)
- die("Could not open file '%s': %s", filename, strerror(errno));
+ die_errno("Could not open file '%s'", filename);
while (strbuf_getline(&str, fp, '\n') != EOF) {
char *quoted;
@@ -740,8 +740,7 @@ static void mark_expected_rev(char *bisect_rev_hex)
int fd = open(filename, O_CREAT | O_TRUNC | O_WRONLY, 0600);
if (fd < 0)
- die("could not create file '%s': %s",
- filename, strerror(errno));
+ die_errno("could not create file '%s'", filename);
bisect_rev_hex[len] = '\n';
write_or_die(fd, bisect_rev_hex, len + 1);