aboutsummaryrefslogtreecommitdiff
path: root/src/report.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/report.c')
-rw-r--r--src/report.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/report.c b/src/report.c
index 84a9592..b09c7c7 100644
--- a/src/report.c
+++ b/src/report.c
@@ -31,20 +31,23 @@ report_init ()
31 31
32void 32void
33report_add (const char *fmt, ...) 33report_add (const char *fmt, ...)
34{ 34{
35 va_list ap; 35 va_list ap;
36 char *str = NULL; 36 char *str = NULL;
37 size_t size = 0;
38
37 va_start (ap, fmt); 39 va_start (ap, fmt);
38 vasprintf (&str, fmt, ap); 40 grecs_vasprintf (&str, &size, fmt, ap);
39 va_end (ap); 41 va_end (ap);
40 if (str) 42 if (str)
41 { 43 {
42 obstack_grow (&report_stk, str, strlen (str)); 44 obstack_grow (&report_stk, str, strlen (str));
43 obstack_1grow (&report_stk, '\n'); 45 obstack_1grow (&report_stk, '\n');
44 } 46 }
47 free (str);
45} 48}
46 49
47void 50void
48report_finish () 51report_finish ()
49{ 52{
50 obstack_1grow (&report_stk, 0); 53 obstack_1grow (&report_stk, 0);

Return to:

Send suggestions and report system problems to the System administrator.