comparison src/http/modules/ngx_http_upstream_ip_hash_module.c @ 5359:2fda9065d0f4

Win32: Borland C compatibility fixes. Several false positive warnings silenced, notably W8012 "Comparing signed and unsigned" (due to u_short values promoted to int), and W8072 "Suspicious pointer arithmetic" (due to large type values added to pointers). With this patch, it's now again possible to compile nginx using bcc32, with options we normally compile on win32 minus ipv6 and ssl.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 04 Sep 2013 20:48:23 +0400
parents 5373be93c0be
children 741aa3fde496
comparison
equal deleted inserted replaced
5358:670ceaba03d8 5359:2fda9065d0f4
172 172
173 hash = iphp->hash; 173 hash = iphp->hash;
174 174
175 for ( ;; ) { 175 for ( ;; ) {
176 176
177 for (i = 0; i < iphp->addrlen; i++) { 177 for (i = 0; i < (ngx_uint_t) iphp->addrlen; i++) {
178 hash = (hash * 113 + iphp->addr[i]) % 6271; 178 hash = (hash * 113 + iphp->addr[i]) % 6271;
179 } 179 }
180 180
181 if (!iphp->rrp.peers->weighted) { 181 if (!iphp->rrp.peers->weighted) {
182 p = hash % iphp->rrp.peers->number; 182 p = hash % iphp->rrp.peers->number;