# HG changeset patch # User Igor Sysoev # Date 1228844477 0 # Node ID ad08367a257b3eefa550631995c6e54e07298d7b # Parent 722b5aff05ae1003c2952d211e97e3ae66369fd5 compact win32 errno logging diff -r 722b5aff05ae -r ad08367a257b src/core/ngx_log.c --- a/src/core/ngx_log.c Tue Dec 09 17:27:48 2008 +0000 +++ b/src/core/ngx_log.c Tue Dec 09 17:41:17 2008 +0000 @@ -127,18 +127,10 @@ } #if (NGX_WIN32) - - 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); #else - p = ngx_snprintf(p, last - p, " (%d: ", err); - #endif p = ngx_strerror_r(err, p, last - p); diff -r 722b5aff05ae -r ad08367a257b src/os/win32/ngx_gui.c --- a/src/os/win32/ngx_gui.c Tue Dec 09 17:27:48 2008 +0000 +++ b/src/os/win32/ngx_gui.c Tue Dec 09 17:41:17 2008 +0000 @@ -36,13 +36,8 @@ *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) {