mirror of
https://github.com/nginx/nginx.git
synced 2025-06-27 17:22:48 +08:00
compact win32 errno logging
This commit is contained in:
parent
c9aae14a7e
commit
a70d3962bb
@ -127,18 +127,10 @@ ngx_log_error_core(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if (NGX_WIN32)
|
#if (NGX_WIN32)
|
||||||
|
p = ngx_snprintf(p, last - p, ((unsigned) err < 0x80000000)
|
||||||
if ((unsigned) err >= 0x80000000) {
|
? " (%d: " : " (%Xd: ", err);
|
||||||
p = ngx_snprintf(p, last - p, " (%Xd: ", err);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
p = ngx_snprintf(p, last - p, " (%d: ", err);
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
p = ngx_snprintf(p, last - p, " (%d: ", err);
|
p = ngx_snprintf(p, last - p, " (%d: ", err);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
p = ngx_strerror_r(err, p, last - p);
|
p = ngx_strerror_r(err, p, last - p);
|
||||||
|
@ -36,13 +36,8 @@ ngx_message_box(char *title, ngx_uint_t type, ngx_err_t err,
|
|||||||
*p++ = '.';
|
*p++ = '.';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((unsigned) err >= 0x80000000) {
|
p = ngx_snprintf(p, last - p, ((unsigned) err < 0x80000000)
|
||||||
p = ngx_snprintf(p, last - p, " (%Xd: ", err);
|
? " (%d: " : " (%Xd: ", err);
|
||||||
|
|
||||||
} else {
|
|
||||||
p = ngx_snprintf(p, last - p, " (%d: ", err);
|
|
||||||
}
|
|
||||||
|
|
||||||
p = ngx_strerror_r(err, p, last - p);
|
p = ngx_strerror_r(err, p, last - p);
|
||||||
|
|
||||||
if (p < last) {
|
if (p < last) {
|
||||||
|
Loading…
Reference in New Issue
Block a user