Search
j0ke.net Open Build Service
>
Projects
>
home:jg
:
http-testing
>
nginx
> nginx-memset_zero.patch
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File nginx-memset_zero.patch of Package nginx (Revision 9)
Currently displaying revision
9
,
show latest
diff -ur nginx-1.2.5.orig/src/core/ngx_string.h nginx-1.2.5/src/core/ngx_string.h --- nginx-1.2.5.orig/src/core/ngx_string.h 2012-09-24 22:34:04.000000000 +0400 +++ nginx-1.2.5/src/core/ngx_string.h 2012-11-14 11:36:25.226866540 +0400 @@ -83,8 +83,8 @@ * while ZeroMemory() and bzero() are the calls. * icc7 may also inline several mov's of a zeroed register for small blocks. */ -#define ngx_memzero(buf, n) (void) memset(buf, 0, n) -#define ngx_memset(buf, c, n) (void) memset(buf, c, n) +#define ngx_memzero(buf, n) (void) ( n ? memset(buf, 0, n) : buf ) +#define ngx_memset(buf, c, n) (void) ( n ? memset(buf, c, n) : buf ) #if (NGX_MEMCPY_LIMIT)