Welcome! Log In Create A New Profile

Advanced

[nginx] Log: use ngx_cpymem() in a couple of places, no function...

Valentin Bartenev
March 04, 2015 11:24AM
details: http://hg.nginx.org/nginx/rev/93fee708f168
branches:
changeset: 6000:93fee708f168
user: Valentin Bartenev <vbart@nginx.com>
date: Wed Mar 04 19:20:30 2015 +0300
description:
Log: use ngx_cpymem() in a couple of places, no functional changes.

diffstat:

src/core/ngx_log.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)

diffs (27 lines):

diff -r 4d8936b1fc32 -r 93fee708f168 src/core/ngx_log.c
--- a/src/core/ngx_log.c Tue Mar 03 17:48:57 2015 +0300
+++ b/src/core/ngx_log.c Wed Mar 04 19:20:30 2015 +0300
@@ -97,10 +97,8 @@ ngx_log_error_core(ngx_uint_t level, ngx

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
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);

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] Log: use ngx_cpymem() in a couple of places, no function...

Valentin Bartenev 643 March 04, 2015 11:24AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 259
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready