/* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
- *
+ *
* Libmemcached library
*
* Copyright (C) 2011 Data Differential, http://datadifferential.com/
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)
{
if (size_t(sort_host_length) >= sizeof(sort_host) or sort_host_length < 0)
{
- return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT,
+ return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT,
memcached_literal_param("snprintf(sizeof(sort_host))"));
}
if (size_t(sort_host_length) >= sizeof(sort_host) or sort_host_length < 0)
{
- return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT,
+ return memcached_set_error(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT,
memcached_literal_param("snprintf(sizeof(sort_host)))"));
}
return MEMCACHED_SUCCESS;
}
-static memcached_return_t server_add(Memcached *memc,
+static memcached_return_t server_add(Memcached *memc,
const memcached_string_t& hostname,
in_port_t port,
uint32_t weight,
WATCHPOINT_ASSERT(instance);
memcached_string_t hostname= { memcached_string_make_from_cstr(list[x].hostname) };
- if (__instance_create_with(ptr, instance,
+ if (__instance_create_with(ptr, instance,
hostname,
list[x].port, list[x].weight, list[x].type) == NULL)
{
WATCHPOINT_ASSERT(instance);
memcached_string_t hostname= { memcached_string_make_from_cstr(list[x]._hostname) };
- if (__instance_create_with(ptr, instance,
+ if (__instance_create_with(ptr, instance,
hostname,
list[x].port(), list[x].weight, list[x].type) == NULL)
{