aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2015-03-04 19:20:30 +0300
committerValentin Bartenev <vbart@nginx.com>2015-03-04 19:20:30 +0300
commita9a01e09380466339cc2f7769e7d0263841cded1 (patch)
tree0d8c33894e397c51637f2cfc44104b3b506f8d60 /src
parent2f3fb935b454e7410d98717a33ab1da38d750e7e (diff)
downloadnginx-a9a01e09380466339cc2f7769e7d0263841cded1.tar.gz
nginx-a9a01e09380466339cc2f7769e7d0263841cded1.zip
Log: use ngx_cpymem() in a couple of places, no functional changes.
Diffstat (limited to 'src')
-rw-r--r--src/core/ngx_log.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/core/ngx_log.c b/src/core/ngx_log.c
index 0cf235998..bfda8eea3 100644
--- a/src/core/ngx_log.c
+++ b/src/core/ngx_log.c
@@ -97,10 +97,8 @@ ngx_log_error_core(ngx_uint_t level, ngx_log_t *log, ngx_err_t err,
last = errstr + NGX_MAX_ERROR_STR;
- ngx_memcpy(errstr, ngx_cached_err_log_time.data,
- ngx_cached_err_log_time.len);
-
- p = errstr + ngx_cached_err_log_time.len;
+ p = ngx_cpymem(errstr, ngx_cached_err_log_time.data,
+ ngx_cached_err_log_time.len);
p = ngx_slprintf(p, last, " [%V] ", &err_levels[level]);
@@ -248,9 +246,8 @@ ngx_log_stderr(ngx_err_t err, const char *fmt, ...)
u_char errstr[NGX_MAX_ERROR_STR];
last = errstr + NGX_MAX_ERROR_STR;
- p = errstr + 7;
- ngx_memcpy(errstr, "nginx: ", 7);
+ p = ngx_cpymem(errstr, "nginx: ", 7);
va_start(args, fmt);
p = ngx_vslprintf(p, last, fmt, args);