Mercurial > hg > nginx-quic
diff src/core/ngx_slab.c @ 1845:8f5745fe2636 stable-0.5
r1646 merge:
the simple expression has the same precision without overflow
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Tue, 08 Jan 2008 17:09:08 +0000 |
parents | 06306a20b8bb |
children | b794d78e52c5 |
line wrap: on
line diff
--- a/src/core/ngx_slab.c +++ b/src/core/ngx_slab.c @@ -111,10 +111,7 @@ ngx_slab_init(ngx_slab_pool_t *pool) p += n * sizeof(ngx_slab_page_t); - /* STUB: possible overflow on 64-bit platform */ - pages = (ngx_uint_t) ((uint64_t) size * ngx_pagesize - / (ngx_pagesize + sizeof(ngx_slab_page_t)) - / ngx_pagesize); + pages = (ngx_uint_t) (size / (ngx_pagesize + sizeof(ngx_slab_page_t))); ngx_memzero(p, pages * sizeof(ngx_slab_page_t));