summaryrefslogtreecommitdiffhomepage
path: root/src/os/win32/ngx_event_log.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2009-04-27 13:06:20 +0000
committerIgor Sysoev <igor@sysoev.ru>2009-04-27 13:06:20 +0000
commite1c9746e371d387f4166fe99d65fd94a3f27c260 (patch)
tree44dd93d5cb7ab37348c9688768598318ef5703fd /src/os/win32/ngx_event_log.c
parent4e1fe03e0388f64a5a221bbda4ac637231ea9686 (diff)
downloadnginx-e1c9746e371d387f4166fe99d65fd94a3f27c260.tar.gz
nginx-e1c9746e371d387f4166fe99d65fd94a3f27c260.tar.bz2
use ngx_vslprintf(), ngx_slprintf()
Diffstat (limited to '')
-rw-r--r--src/os/win32/ngx_event_log.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/os/win32/ngx_event_log.c b/src/os/win32/ngx_event_log.c
index 98887605a..d7b9bcafe 100644
--- a/src/os/win32/ngx_event_log.c
+++ b/src/os/win32/ngx_event_log.c
@@ -22,17 +22,16 @@ ngx_event_log(ngx_err_t err, const char *fmt, ...)
const char *msgarg[9];
static u_char netmsg[] = "%SystemRoot%\\System32\\netmsg.dll";
+ last = text + NGX_MAX_ERROR_STR;
p = text + GetModuleFileName(NULL, (char *) text, NGX_MAX_ERROR_STR - 50);
*p++ = ':';
ngx_linefeed(p);
va_start(args, fmt);
- p = ngx_vsnprintf(p, NGX_MAX_ERROR_STR, fmt, args);
+ p = ngx_vslprintf(p, last, fmt, args);
va_end(args);
- last = text + NGX_MAX_ERROR_STR;
-
if (err) {
if (p > last - 50) {
@@ -45,8 +44,8 @@ ngx_event_log(ngx_err_t err, const char *fmt, ...)
*p++ = '.';
}
- p = ngx_snprintf(p, last - p, ((unsigned) err < 0x80000000)
- ? " (%d: " : " (%Xd: ", err);
+ p = ngx_slprintf(p, last, ((unsigned) err < 0x80000000)
+ ? " (%d: " : " (%Xd: ", err);
p = ngx_strerror_r(err, p, last - p);
if (p < last) {