diff options
| author | Igor Sysoev <igor@sysoev.ru> | 2009-04-01 15:47:12 +0000 |
|---|---|---|
| committer | Igor Sysoev <igor@sysoev.ru> | 2009-04-01 15:47:12 +0000 |
| commit | 8ec919d16f63aeed10e71a49b1dc2fbbdb244d73 (patch) | |
| tree | 07e0d09898a5bd476d4f395902a7d4721ba6be68 /src/os/win32/ngx_gui.c | |
| parent | 9f958f5b9b071db4a69d7a02db4c4bbe5fd374b9 (diff) | |
| download | nginx-8ec919d16f63aeed10e71a49b1dc2fbbdb244d73.tar.gz nginx-8ec919d16f63aeed10e71a49b1dc2fbbdb244d73.tar.bz2 | |
r2336, r2337, r2339, r2390 merge:
bugfixes in error logging:
*) ngx_strerror_r() style and size == 0 bug fix
*) increase ngx_conf_log_error() buffer
*) always log an error code
*) fix segfault on close error
*) compact win32 errno logging
Diffstat (limited to 'src/os/win32/ngx_gui.c')
| -rw-r--r-- | src/os/win32/ngx_gui.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/os/win32/ngx_gui.c b/src/os/win32/ngx_gui.c index 138d44a6b..ba6564560 100644 --- a/src/os/win32/ngx_gui.c +++ b/src/os/win32/ngx_gui.c @@ -36,13 +36,8 @@ ngx_message_box(char *title, ngx_uint_t type, ngx_err_t err, *p++ = '.'; } - if ((unsigned) err >= 0x80000000) { - p = ngx_snprintf(p, last - p, " (%Xd: ", err); - - } else { - p = ngx_snprintf(p, last - p, " (%d: ", err); - } - + p = ngx_snprintf(p, last - p, ((unsigned) err < 0x80000000) + ? " (%d: " : " (%Xd: ", err); p = ngx_strerror_r(err, p, last - p); if (p < last) { |
