Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-06-30 00:17:26 +0300
committerJunio C Hamano <gitster@pobox.com>2020-06-30 00:17:26 +0300
commit610486749aca4ce9e5923baa70b072eff69a9867 (patch)
tree1f3e76a1110c6f5aa1ead924e09dc6cd63dc1dd7 /bugreport.c
parent1ea1f93fd9c6d299cbb94f74f0a1d80cb481a449 (diff)
parent5f2b643e76d9a1330c1a02489c0787ca7d818633 (diff)
Merge branch 'rs/retire-strbuf-write-fd'
A misdesigned strbuf_write_fd() function has been retired. * rs/retire-strbuf-write-fd: strbuf: remove unreferenced strbuf_write_fd method. bugreport.c: replace strbuf_write_fd with write_in_full
Diffstat (limited to 'bugreport.c')
-rw-r--r--bugreport.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/bugreport.c b/bugreport.c
index 28f4568b01..09579e268d 100644
--- a/bugreport.c
+++ b/bugreport.c
@@ -180,7 +180,9 @@ int cmd_main(int argc, const char **argv)
die(_("couldn't create a new file at '%s'"), report_path.buf);
}
- strbuf_write_fd(&buffer, report);
+ if (write_in_full(report, buffer.buf, buffer.len) < 0)
+ die_errno(_("unable to write to %s"), report_path.buf);
+
close(report);
/*