fix: proper va_end usage
parent
0e39ce3618
commit
f5c0db7733
|
@ -8,7 +8,6 @@
|
||||||
#include "lnm/http/req.h"
|
#include "lnm/http/req.h"
|
||||||
#include "lnm/log.h"
|
#include "lnm/log.h"
|
||||||
#include "lnm/loop.h"
|
#include "lnm/loop.h"
|
||||||
#include "lnm/loop_internal.h"
|
|
||||||
|
|
||||||
static const char *section = "http";
|
static const char *section = "http";
|
||||||
|
|
||||||
|
|
|
@ -65,6 +65,9 @@ void lnm_vlog(lnm_log_level level, const char *section, const char *fmt,
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
va_list aq;
|
||||||
|
va_copy(aq, ap);
|
||||||
|
|
||||||
switch (stream->type) {
|
switch (stream->type) {
|
||||||
case lnm_logger_stream_type_file:
|
case lnm_logger_stream_type_file:
|
||||||
fprintf(stream->ptr, "[%s][%s][%s] ", date_str,
|
fprintf(stream->ptr, "[%s][%s][%s] ", date_str,
|
||||||
|
@ -74,7 +77,7 @@ void lnm_vlog(lnm_log_level level, const char *section, const char *fmt,
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
va_end(ap);
|
va_end(aq);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue