Klaus Demo nginx / daab61e
fix a bug when ngx_cpymem() returns a cast type: p = (type *) ngx_cpymem(...) Igor Sysoev 12 years ago
1 changed file(s) with 2 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
8888 #if (NGX_MEMCPY_LIMIT)
8989
9090 void *ngx_memcpy(void *dst, void *src, size_t n);
91 #define ngx_cpymem(dst, src, n) ((u_char *) ngx_memcpy(dst, src, n)) + (n)
91 #define ngx_cpymem(dst, src, n) (((u_char *) ngx_memcpy(dst, src, n)) + (n))
9292
9393 #else
9494
9898 * icc8 compile memcpy(d, s, 4) to the inline "mov"es or XMM moves.
9999 */
100100 #define ngx_memcpy(dst, src, n) (void) memcpy(dst, src, n)
101 #define ngx_cpymem(dst, src, n) ((u_char *) memcpy(dst, src, n)) + (n)
101 #define ngx_cpymem(dst, src, n) (((u_char *) memcpy(dst, src, n)) + (n))
102102
103103 #endif
104104