aboutsummaryrefslogtreecommitdiff
path: root/read-cache.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-11 13:53:49 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-11 13:53:49 -0700
commit0dcad32ae239906217065b6a2b0fca41962e5d57 (patch)
tree364de08062838733978d41da581fcdbb73c4f1b9 /read-cache.c
parent32d197f18d0be74a4d82e8c42513d83423091a22 (diff)
downloadgit-0dcad32ae239906217065b6a2b0fca41962e5d57.tar.gz
git-0dcad32ae239906217065b6a2b0fca41962e5d57.tar.xz
Fix "usage()" to do the missing line termination.
It got broken when I changed it to use stdarg.
Diffstat (limited to 'read-cache.c')
-rw-r--r--read-cache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/read-cache.c b/read-cache.c
index 51403cea1..3c575f7d1 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -12,10 +12,12 @@ unsigned int active_nr = 0, active_alloc = 0;
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);
}