diff options
Diffstat (limited to 'src/os/win32/ngx_event_log.c')
-rw-r--r-- | src/os/win32/ngx_event_log.c | 9 |
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) { |