projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge lp:~tangent-org/libmemcached/1.0-build/ Build: jenkins-Libmemcached-202
[awesomized/libmemcached]
/
libmemcached
/
server_list.cc
diff --git
a/libmemcached/server_list.cc
b/libmemcached/server_list.cc
index 537e9edd8dfb04e7817a22e369793b6072d8fc3d..b42a90953ce3c061bc591bc28a360ab9c20e47a5 100644
(file)
--- a/
libmemcached/server_list.cc
+++ b/
libmemcached/server_list.cc
@@
-45,11
+45,11
@@
memcached_server_list_append_with_weight(memcached_server_list_st ptr,
uint32_t weight,
memcached_return_t *error)
{
uint32_t weight,
memcached_return_t *error)
{
- uint32_t count;
-
memcached_return_t unused;
if (error == NULL)
memcached_return_t unused;
if (error == NULL)
+ {
error= &unused;
error= &unused;
+ }
if (hostname == NULL)
{
if (hostname == NULL)
{
@@
-60,14
+60,14
@@
memcached_server_list_append_with_weight(memcached_server_list_st ptr,
{
port = 0;
}
{
port = 0;
}
- else if (
not port
)
+ else if (
port == 0
)
{
port= MEMCACHED_DEFAULT_PORT;
}
/* Increment count for hosts */
{
port= MEMCACHED_DEFAULT_PORT;
}
/* Increment count for hosts */
- count= 1;
+
uint32_t
count= 1;
if (ptr != NULL)
{
count+= memcached_server_list_count(ptr);
if (ptr != NULL)
{
count+= memcached_server_list_count(ptr);
@@
-129,6
+129,7
@@
uint32_t memcached_instance_list_count(const memcached_st* self)
void memcached_instance_set(memcached_st* memc, org::libmemcached::Instance* list, const uint32_t host_list_size)
{
void memcached_instance_set(memcached_st* memc, org::libmemcached::Instance* list, const uint32_t host_list_size)
{
+ assert(memc);
memc->servers= list;
memc->number_of_hosts= host_list_size;
}
memc->servers= list;
memc->number_of_hosts= host_list_size;
}