summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b9217c0)
raw | patch | inline | side by side (parent: b9217c0)
author | Nicolas Pitre <nico@cam.org> | |
Fri, 9 Nov 2007 19:33:54 +0000 (14:33 -0500) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sat, 10 Nov 2007 06:25:36 +0000 (22:25 -0800) |
Not doing so is likely to create a messed up display when sent over the
sideband protocol.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
sideband protocol.
Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
usage.c | patch | blob | history |
index f5e652cc76d7587fd7b682eb865d3436c99b16fb..a5fc4ec5fae66823266862fa0254474696c220e6 100644 (file)
--- a/usage.c
+++ b/usage.c
static void report(const char *prefix, const char *err, va_list params)
{
- fputs(prefix, stderr);
- vfprintf(stderr, err, params);
- fputs("\n", stderr);
+ char msg[256];
+ vsnprintf(msg, sizeof(msg), err, params);
+ fprintf(stderr, "%s%s\n", prefix, msg);
}
static NORETURN void usage_builtin(const char *err)