mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-03 03:46:47 +00:00
Fix #62, merge branch 'fix-log-stdarg' into development
Replaces ®om's 64-bit fix with a simpler one (using the C99 va_copy() primitive) that does not remove the vlogMessage() function
This commit is contained in:
commit
4e3c93e00a
14
log.c
14
log.c
@ -395,9 +395,10 @@ static void _log_iterator_printf_nl(_log_iterator *it, int level, struct __sourc
|
|||||||
_log_iterator_rewind(it);
|
_log_iterator_rewind(it);
|
||||||
while (_log_iterator_next(it, level)) {
|
while (_log_iterator_next(it, level)) {
|
||||||
_log_prefix_whence(it, whence);
|
_log_prefix_whence(it, whence);
|
||||||
va_start(ap, fmt);
|
va_list ap1;
|
||||||
vxprintf(it->xpf, fmt, ap);
|
va_copy(ap1, ap);
|
||||||
va_end(ap);
|
vxprintf(it->xpf, fmt, ap1);
|
||||||
|
va_end(ap1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -681,9 +682,10 @@ void logMessage(int level, struct __sourceloc whence, const char *fmt, ...)
|
|||||||
_rotate_log_file(&it);
|
_rotate_log_file(&it);
|
||||||
while (_log_iterator_next(&it, level)) {
|
while (_log_iterator_next(&it, level)) {
|
||||||
_log_prefix_whence(&it, whence);
|
_log_prefix_whence(&it, whence);
|
||||||
va_start(ap, fmt);
|
va_list ap1;
|
||||||
vxprintf(it.xpf, fmt, ap);
|
va_copy(ap1, ap);
|
||||||
va_end(ap);
|
vxprintf(it.xpf, fmt, ap1);
|
||||||
|
va_end(ap1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user