mirror of
https://github.com/octoleo/lsyncd.git
synced 2025-01-06 08:40:44 +00:00
fix va_calls for 64bit systems
This commit is contained in:
parent
7d053d0679
commit
2092eff408
9
lsyncd.c
9
lsyncd.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user