]> git.kaiwu.me - nginx.git/commitdiff
Style: NGX_PTR_SIZE replaced with sizeof(void *).
authorMaxim Dounin <mdounin@mdounin.ru>
Thu, 3 Dec 2015 17:06:45 +0000 (20:06 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Thu, 3 Dec 2015 17:06:45 +0000 (20:06 +0300)
The NGX_PTR_SIZE macro is only needed in preprocessor directives where
it's not possible to use sizeof().

src/core/ngx_string.c
src/http/ngx_http_core_module.c

index d2a8d01173b1241797314f7199f3ed834c552b98..cf665a4e85032fd410184de6a52dfebc2e6b0aa4 100644 (file)
@@ -410,7 +410,7 @@ ngx_vslprintf(u_char *buf, u_char *last, const char *fmt, va_list args)
                 hex = 2;
                 sign = 0;
                 zero = '0';
-                width = NGX_PTR_SIZE * 2;
+                width = 2 * sizeof(void *);
                 break;
 
             case 'c':
index acb9c909e080e83cc998456b9e86f7e3a540ff37..4b8dd4c90a5c79f25869c906fca307dffda97c8e 100644 (file)
@@ -3503,7 +3503,7 @@ ngx_http_core_merge_srv_conf(ngx_conf_t *cf, void *parent, void *child)
     /* TODO: it does not merge, it inits only */
 
     ngx_conf_merge_size_value(conf->connection_pool_size,
-                              prev->connection_pool_size, NGX_PTR_SIZE * 64);
+                              prev->connection_pool_size, 64 * sizeof(void *));
     ngx_conf_merge_size_value(conf->request_pool_size,
                               prev->request_pool_size, 4096);
     ngx_conf_merge_msec_value(conf->client_header_timeout,