[nginx] svn commit: r5151 - in branches/stable-1.2: . src/http/modules

mdounin at mdounin.ru mdounin at mdounin.ru
Fri Mar 29 17:11:10 UTC 2013


Author: mdounin
Date: 2013-03-29 17:11:09 +0000 (Fri, 29 Mar 2013)
New Revision: 5151
URL: http://trac.nginx.org/nginx/changeset/5151/nginx

Log:
Merge of r5070: fixed false memset warning on Linux.

Fixed false memset warning on Linux with -O3 (ticket #275).

Prodded by John Leach.


Modified:
   branches/stable-1.2/
   branches/stable-1.2/src/http/modules/ngx_http_autoindex_module.c

Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2	2013-03-29 15:29:29 UTC (rev 5150)
+++ branches/stable-1.2	2013-03-29 17:11:09 UTC (rev 5151)

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-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4925,4933-4934,4939,4944-4949,4961-4969,4973-4974,4976-4994,4997,4999-5005,5011-5025,5027-5031,5066
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4925,4933-4934,4939,4944-4949,4961-4969,4973-4974,4976-4994,4997,4999-5005,5011-5025,5027-5031,5066,5070
\ No newline at end of property
Modified: branches/stable-1.2/src/http/modules/ngx_http_autoindex_module.c
===================================================================
--- branches/stable-1.2/src/http/modules/ngx_http_autoindex_module.c	2013-03-29 15:29:29 UTC (rev 5150)
+++ branches/stable-1.2/src/http/modules/ngx_http_autoindex_module.c	2013-03-29 17:11:09 UTC (rev 5151)
@@ -489,8 +489,11 @@
             }
 
             b->last = ngx_cpymem(b->last, "</a>", sizeof("</a>") - 1);
-            ngx_memset(b->last, ' ', NGX_HTTP_AUTOINDEX_NAME_LEN - len);
-            b->last += NGX_HTTP_AUTOINDEX_NAME_LEN - len;
+
+            if (NGX_HTTP_AUTOINDEX_NAME_LEN - len > 0) {
+                ngx_memset(b->last, ' ', NGX_HTTP_AUTOINDEX_NAME_LEN - len);
+                b->last += NGX_HTTP_AUTOINDEX_NAME_LEN - len;
+            }
         }
 
         *b->last++ = ' ';



More information about the nginx-devel mailing list