fix warning (double promotion)
authorMichael Wallner <mike@php.net>
Tue, 13 Oct 2020 06:43:12 +0000 (08:43 +0200)
committerMichael Wallner <mike@php.net>
Tue, 13 Oct 2020 06:43:12 +0000 (08:43 +0200)
src/libmemcached/hosts.cc

index ab58c9224b948540fb33dfb31154c0f83b8e34b8..b8292b2b1d6712d6d4a5d4693a3628e00f0cba70 100644 (file)
@@ -232,7 +232,7 @@ static memcached_return_t update_continuum(Memcached *ptr)
     if (memcached_is_weighted_ketama(ptr))
     {
         float pct= (float)list[host_index].weight / (float)total_weight;
-        pointer_per_server= (uint32_t) ((::floor((float) (pct * MEMCACHED_POINTS_PER_SERVER_KETAMA / 4 * (float)live_servers + 0.0000000001))) * 4);
+        pointer_per_server= (uint32_t) ((::floor((float) (pct * MEMCACHED_POINTS_PER_SERVER_KETAMA / 4 * (float)live_servers + 0.0000000001F))) * 4);
         pointer_per_hash= 4;
         if (0 && DEBUG)
         {