diff src/os/win32/ngx_gui.c @ 2638:a3f062177dba stable-0.6

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
author Igor Sysoev <igor@sysoev.ru>
date Wed, 01 Apr 2009 15:47:12 +0000
parents 9b8c906f6e63
children
line wrap: on
line diff
--- 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 
             *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) {