[nginx] svn commit: r5070 - trunk/src/http/modules
mdounin at mdounin.ru
mdounin at mdounin.ru
Wed Feb 13 14:39:48 UTC 2013
Author: mdounin
Date: 2013-02-13 14:39:46 +0000 (Wed, 13 Feb 2013)
New Revision: 5070
URL: http://trac.nginx.org/nginx/changeset/5070/nginx
Log:
Fixed false memset warning on Linux with -O3 (ticket #275).
Prodded by John Leach.
Modified:
trunk/src/http/modules/ngx_http_autoindex_module.c
Modified: trunk/src/http/modules/ngx_http_autoindex_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_autoindex_module.c 2013-02-12 13:40:46 UTC (rev 5069)
+++ trunk/src/http/modules/ngx_http_autoindex_module.c 2013-02-13 14:39:46 UTC (rev 5070)
@@ -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