Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4738 - trunk/src/os/unix

Anonymous User
July 03, 2012 09:06AM
Author: ru
Date: 2012-07-03 13:05:18 +0000 (Tue, 03 Jul 2012)
New Revision: 4738
URL: http://trac.nginx.org/nginx/changeset/4738/nginx

Log:
Made sure to initialize the entire "struct flock" allocated on stack.


Modified:
trunk/src/os/unix/ngx_files.c

Modified: trunk/src/os/unix/ngx_files.c
===================================================================
--- trunk/src/os/unix/ngx_files.c 2012-07-03 11:30:05 UTC (rev 4737)
+++ trunk/src/os/unix/ngx_files.c 2012-07-03 13:05:18 UTC (rev 4738)
@@ -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;


_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r4738 - trunk/src/os/unix

Anonymous User 1043 July 03, 2012 09:06AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 241
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready