Mercurial > hg > nginx
comparison src/core/ngx_log.c @ 6000:93fee708f168
Log: use ngx_cpymem() in a couple of places, no functional changes.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Wed, 04 Mar 2015 19:20:30 +0300 |
parents | 727177743c3c |
children | 8e66a83d16ae |
comparison
equal
deleted
inserted
replaced
5999:4d8936b1fc32 | 6000:93fee708f168 |
---|---|
95 ngx_uint_t wrote_stderr, debug_connection; | 95 ngx_uint_t wrote_stderr, debug_connection; |
96 u_char errstr[NGX_MAX_ERROR_STR]; | 96 u_char errstr[NGX_MAX_ERROR_STR]; |
97 | 97 |
98 last = errstr + NGX_MAX_ERROR_STR; | 98 last = errstr + NGX_MAX_ERROR_STR; |
99 | 99 |
100 ngx_memcpy(errstr, ngx_cached_err_log_time.data, | 100 p = ngx_cpymem(errstr, ngx_cached_err_log_time.data, |
101 ngx_cached_err_log_time.len); | 101 ngx_cached_err_log_time.len); |
102 | |
103 p = errstr + ngx_cached_err_log_time.len; | |
104 | 102 |
105 p = ngx_slprintf(p, last, " [%V] ", &err_levels[level]); | 103 p = ngx_slprintf(p, last, " [%V] ", &err_levels[level]); |
106 | 104 |
107 /* pid#tid */ | 105 /* pid#tid */ |
108 p = ngx_slprintf(p, last, "%P#" NGX_TID_T_FMT ": ", | 106 p = ngx_slprintf(p, last, "%P#" NGX_TID_T_FMT ": ", |
246 u_char *p, *last; | 244 u_char *p, *last; |
247 va_list args; | 245 va_list args; |
248 u_char errstr[NGX_MAX_ERROR_STR]; | 246 u_char errstr[NGX_MAX_ERROR_STR]; |
249 | 247 |
250 last = errstr + NGX_MAX_ERROR_STR; | 248 last = errstr + NGX_MAX_ERROR_STR; |
251 p = errstr + 7; | 249 |
252 | 250 p = ngx_cpymem(errstr, "nginx: ", 7); |
253 ngx_memcpy(errstr, "nginx: ", 7); | |
254 | 251 |
255 va_start(args, fmt); | 252 va_start(args, fmt); |
256 p = ngx_vslprintf(p, last, fmt, args); | 253 p = ngx_vslprintf(p, last, fmt, args); |
257 va_end(args); | 254 va_end(args); |
258 | 255 |