diff options
author | Johannes Sixt <j6t@kdbg.org> | 2010-03-06 16:40:39 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-07 00:37:35 -0800 |
commit | ebaa79f462c48e0ed0341d9c8f9c97de557afcfd (patch) | |
tree | f3657097f459f1446ec6dce275aeac8101261f50 /usage.c | |
parent | 1d8cd418b49f08146d6d47cf8881965f922686cb (diff) | |
download | git-ebaa79f462c48e0ed0341d9c8f9c97de557afcfd.tar.gz |
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 <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'usage.c')
-rw-r--r-- | usage.c | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -5,7 +5,7 @@ */ #include "git-compat-util.h" -static void report(const char *prefix, const char *err, va_list params) +void vreportf(const char *prefix, const char *err, va_list params) { char msg[4096]; vsnprintf(msg, sizeof(msg), err, params); @@ -14,24 +14,24 @@ static void report(const char *prefix, const char *err, va_list params) static NORETURN void usage_builtin(const char *err, va_list params) { - report("usage: ", err, params); + vreportf("usage: ", err, params); exit(129); } static NORETURN void die_builtin(const char *err, va_list params) { - report("fatal: ", err, params); + vreportf("fatal: ", err, params); exit(128); } static void error_builtin(const char *err, va_list params) { - report("error: ", err, params); + vreportf("error: ", err, params); } static void warn_builtin(const char *warn, va_list params) { - report("warning: ", warn, params); + vreportf("warning: ", warn, params); } /* If we are in a dlopen()ed .so write to a global variable would segfault |