aboutsummaryrefslogtreecommitdiff
path: root/src/core/ngx_string.h
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2010-06-24 15:17:06 +0000
committerIgor Sysoev <igor@sysoev.ru>2010-06-24 15:17:06 +0000
commitdaab61e40ca2656489acde8367ba916656b13cb1 (patch)
treef7eb8b0302fba61297cf803cd25bffd2ad4cd51e /src/core/ngx_string.h
parente3693e3b3789fcb738a7f25997c8d86f0504477c (diff)
downloadnginx-daab61e40ca2656489acde8367ba916656b13cb1.tar.gz
nginx-daab61e40ca2656489acde8367ba916656b13cb1.zip
fix a bug when ngx_cpymem() returns a cast type:
p = (type *) ngx_cpymem(...)
Diffstat (limited to 'src/core/ngx_string.h')
-rw-r--r--src/core/ngx_string.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/core/ngx_string.h b/src/core/ngx_string.h
index 86a960102..821871470 100644
--- a/src/core/ngx_string.h
+++ b/src/core/ngx_string.h
@@ -89,7 +89,7 @@ ngx_strlchr(u_char *p, u_char *last, u_char c)
#if (NGX_MEMCPY_LIMIT)
void *ngx_memcpy(void *dst, void *src, size_t n);
-#define ngx_cpymem(dst, src, n) ((u_char *) ngx_memcpy(dst, src, n)) + (n)
+#define ngx_cpymem(dst, src, n) (((u_char *) ngx_memcpy(dst, src, n)) + (n))
#else
@@ -99,7 +99,7 @@ void *ngx_memcpy(void *dst, void *src, size_t n);
* icc8 compile memcpy(d, s, 4) to the inline "mov"es or XMM moves.
*/
#define ngx_memcpy(dst, src, n) (void) memcpy(dst, src, n)
-#define ngx_cpymem(dst, src, n) ((u_char *) memcpy(dst, src, n)) + (n)
+#define ngx_cpymem(dst, src, n) (((u_char *) memcpy(dst, src, n)) + (n))
#endif