httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j..@apache.org
Subject svn commit: r1068871 - /httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
Date Wed, 09 Feb 2011 12:56:01 GMT
Author: jim
Date: Wed Feb  9 12:56:01 2011
New Revision: 1068871

URL: http://svn.apache.org/viewvc?rev=1068871&view=rev
Log:
Squash error/warning about signed/unsigned comparison

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c?rev=1068871&r1=1068870&r2=1068871&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_balancer.c Wed Feb  9 12:56:01 2011
@@ -1332,18 +1332,21 @@ PROXY_DECLARE(apr_status_t) ap_proxy_upd
 {
     proxy_worker **workers;
     int i;
-    unsigned int index;
+    int index;
     proxy_worker_shared *shm;
     if (b->s->wupdated <= b->wupdated)
         return APR_SUCCESS;
     /*
      * Look thru the list of workers in shm
-     * and see which one(s) we are lacking
+     * and see which one(s) we are lacking...
+     * again, the cast to unsigned int is safe
+     * since our upper limit is always max_workers
+     * which is int.
      */
     for (index = 0; index < b->max_workers; index++) {
         int found;
         apr_status_t rv;
-        if ((rv = storage->dptr(b->slot, index, (void *)&shm)) != APR_SUCCESS)
{
+        if ((rv = storage->dptr(b->slot, (unsigned int)index, (void *)&shm)) !=
APR_SUCCESS) {
             ap_log_error(APLOG_MARK, APLOG_EMERG, rv, s, "worker slotmem_dptr failed");
             return APR_EGENERAL;
         }



Mime
View raw message