fix va_calls for 64bit systems

This commit is contained in:
Axel Kittenberger 2010-07-09 06:40:53 +00:00
parent 7d053d0679
commit 2092eff408
1 changed files with 6 additions and 3 deletions

View File

@ -452,8 +452,6 @@ void printlogf(int level, const char *fmt, ...)
}
}
va_start(ap, fmt);
time(&mtime);
ct = ctime(&mtime);
ct[strlen(ct) - 1] = 0; // cut trailing linefeed
@ -495,12 +493,18 @@ void printlogf(int level, const char *fmt, ...)
}
if (flog1) {
va_start(ap, fmt);
vfprintf(flog1, fmt, ap);
va_end(ap);
} else {
va_start(ap, fmt);
vsyslog(sysp, fmt, ap);
va_end(ap);
}
if (flog2) {
va_start(ap, fmt);
vfprintf(flog2, fmt, ap);
va_end(ap);
}
if (flog1) {
@ -509,7 +513,6 @@ void printlogf(int level, const char *fmt, ...)
if (flog2) {
fprintf(flog2, "\n");
}
va_end(ap);
if (flog1) {
fclose(flog1);