[nginx] svn commit: r4968 - trunk/src/http/modules

ru at nginx.com ru at nginx.com
Fri Dec 14 19:35:38 UTC 2012


Author: ru
Date: 2012-12-14 19:35:37 +0000 (Fri, 14 Dec 2012)
New Revision: 4968
URL: http://trac.nginx.org/nginx/changeset/4968/nginx

Log:
Geo: improved ngx_http_geo_block() code readability.


Modified:
   trunk/src/http/modules/ngx_http_geo_module.c

Modified: trunk/src/http/modules/ngx_http_geo_module.c
===================================================================
--- trunk/src/http/modules/ngx_http_geo_module.c	2012-12-14 15:24:24 UTC (rev 4967)
+++ trunk/src/http/modules/ngx_http_geo_module.c	2012-12-14 19:35:37 UTC (rev 4968)
@@ -303,7 +303,6 @@
 ngx_http_geo_block(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 {
     char                     *rv;
-    void                    **p;
     size_t                    len;
     ngx_str_t                *value, name;
     ngx_uint_t                i;
@@ -402,8 +401,8 @@
                     return NGX_CONF_ERROR;
                 }
 
-                p = (void **) ngx_cpymem(ctx.high.low[i], a->elts, len);
-                *p = NULL;
+                ngx_memcpy(ctx.high.low[i], a->elts, len);
+                ctx.high.low[i][a->nelts].value = NULL;
                 ctx.data_size += len + sizeof(void *);
             }
 



More information about the nginx-devel mailing list