summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 32d197f)
raw | patch | inline | side by side (parent: 32d197f)
author | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 11 Apr 2005 20:53:49 +0000 (13:53 -0700) | ||
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | |
Mon, 11 Apr 2005 20:53:49 +0000 (13:53 -0700) |
It got broken when I changed it to use stdarg.
read-cache.c | patch | blob | history |
diff --git a/read-cache.c b/read-cache.c
index 51403cea19d60938dce0fed356ce96695b750f7f..3c575f7d1c32b6845a64feec0f700bab81751a8e 100644 (file)
--- a/read-cache.c
+++ b/read-cache.c
void usage(const char *err, ...)
{
va_list args;
+ char string[200];
va_start(args, err);
- vfprintf(stderr, err, args);
+ vsnprintf(string, sizeof(string), err, args);
va_end(args);
+ fprintf(stderr, "%s\n", string);
exit(1);
}