compact win32 errno logging
diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c
index e3abcd7..cc38b02 100644
--- a/src/core/ngx_log.c
+++ b/src/core/ngx_log.c
@@ -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 --git a/src/os/win32/ngx_gui.c b/src/os/win32/ngx_gui.c
index 138d44a..ba65645 100644
--- a/src/os/win32/ngx_gui.c
+++ b/src/os/win32/ngx_gui.c
@@ -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) {