projects
/
awesomized
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Add test for 1048945. The error was in the user's code. This code was corrected and...
[awesomized/libmemcached]
/
libmemcached
/
server_list.cc
diff --git
a/libmemcached/server_list.cc
b/libmemcached/server_list.cc
index 537e9edd8dfb04e7817a22e369793b6072d8fc3d..5ead6fe929d9eb0481a845c3fcdf0c62fd5a51ba 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);