diff src/core/ngx_conf_file.c @ 2765:6d358aeaa989

ngx_log_errno()
author Igor Sysoev <igor@sysoev.ru>
date Mon, 27 Apr 2009 13:17:33 +0000
parents d4a717592877
children 9b107cdf53f6
line wrap: on
line diff
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -965,27 +965,7 @@ ngx_conf_log_error(ngx_uint_t level, ngx
     va_end(args);
 
     if (err) {
-
-        if (p > last - 50) {
-
-            /* leave a space for an error code */
-
-            p = last - 50;
-            *p++ = '.';
-            *p++ = '.';
-            *p++ = '.';
-        }
-
-#if (NGX_WIN32)
-        p = ngx_slprintf(p, last, ((unsigned) err < 0x80000000)
-                                       ? " (%d: " : " (%Xd: ", err);
-#else
-        p = ngx_slprintf(p, last, " (%d: ", err);
-#endif
-
-        p = ngx_strerror_r(err, p, last - p);
-
-        *p++ = ')';
+        p = ngx_log_errno(p, last, err);
     }
 
     if (cf->conf_file == NULL) {