[nginx] svn commit: r4789 - in branches/stable-1.2: . src/os/unix
mdounin at mdounin.ru
mdounin at mdounin.ru
Mon Aug 6 15:31:49 UTC 2012
Author: mdounin
Date: 2012-08-06 15:31:49 +0000 (Mon, 06 Aug 2012)
New Revision: 4789
URL: http://trac.nginx.org/nginx/changeset/4789/nginx
Log:
Merge of r4738: struct flock initialization.
Made sure to initialize the entire "struct flock" allocated on stack.
Modified:
branches/stable-1.2/
branches/stable-1.2/src/os/unix/ngx_files.c
Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2 2012-08-06 15:20:03 UTC (rev 4788)
+++ branches/stable-1.2 2012-08-06 15:31:49 UTC (rev 4789)
Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4737
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4738
\ No newline at end of property
Modified: branches/stable-1.2/src/os/unix/ngx_files.c
===================================================================
--- branches/stable-1.2/src/os/unix/ngx_files.c 2012-08-06 15:20:03 UTC (rev 4788)
+++ branches/stable-1.2/src/os/unix/ngx_files.c 2012-08-06 15:31:49 UTC (rev 4789)
@@ -413,9 +413,7 @@
{
struct flock fl;
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_pid = 0;
+ ngx_memzero(&fl, sizeof(struct flock));
fl.l_type = F_WRLCK;
fl.l_whence = SEEK_SET;
@@ -432,9 +430,7 @@
{
struct flock fl;
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_pid = 0;
+ ngx_memzero(&fl, sizeof(struct flock));
fl.l_type = F_WRLCK;
fl.l_whence = SEEK_SET;
@@ -451,9 +447,7 @@
{
struct flock fl;
- fl.l_start = 0;
- fl.l_len = 0;
- fl.l_pid = 0;
+ ngx_memzero(&fl, sizeof(struct flock));
fl.l_type = F_UNLCK;
fl.l_whence = SEEK_SET;
More information about the nginx-devel
mailing list