From ebaa79f462c48e0ed0341d9c8f9c97de557afcfd Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Sat, 6 Mar 2010 16:40:39 +0100 Subject: Make report() from usage.c public as vreportf() and use it. There exist already a number of static functions named 'report', therefore, the function name was changed. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- fast-import.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'fast-import.c') diff --git a/fast-import.c b/fast-import.c index 309f2c58a2..f2ef20cbf0 100644 --- a/fast-import.c +++ b/fast-import.c @@ -483,14 +483,12 @@ static void dump_marks(void); static NORETURN void die_nicely(const char *err, va_list params) { static int zombie; - char message[2 * PATH_MAX]; - vsnprintf(message, sizeof(message), err, params); - fputs("fatal: ", stderr); - fputs(message, stderr); - fputc('\n', stderr); + vreportf("fatal: ", err, params); if (!zombie) { + char message[2 * PATH_MAX]; + zombie = 1; write_crash_report(message); end_packfile(); -- cgit v1.2.3