mirror of
https://github.com/nginx/nginx.git
synced 2025-07-26 07:06:55 +08:00
fix a bug when ngx_cpymem() returns a cast type:
p = (type *) ngx_cpymem(...)
This commit is contained in:
parent
e3693e3b37
commit
daab61e40c
@ -89,7 +89,7 @@ ngx_strlchr(u_char *p, u_char *last, u_char c)
|
|||||||
#if (NGX_MEMCPY_LIMIT)
|
#if (NGX_MEMCPY_LIMIT)
|
||||||
|
|
||||||
void *ngx_memcpy(void *dst, void *src, size_t n);
|
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
|
#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.
|
* 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_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
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user