Merge up all of build.
[m6w6/libmemcached] / libmemcached / server_list.cc
index d5994e852560b03bb165e527bef9455dc4c4ffee..f03dc356b05d993aaa339dd8a6b145843320193d 100644 (file)
@@ -83,7 +83,7 @@ memcached_server_list_append_with_weight(memcached_server_list_st ptr,
 
   memcached_string_t _hostname= { memcached_string_make_from_cstr(hostname) };
   /* @todo Check return type */
-  if (not __server_create_with(NULL, &new_host_list[count-1], _hostname, port, weight, port ? MEMCACHED_CONNECTION_TCP : MEMCACHED_CONNECTION_UNIX_SOCKET))
+  if (__server_create_with(NULL, &new_host_list[count-1], _hostname, port, weight, port ? MEMCACHED_CONNECTION_TCP : MEMCACHED_CONNECTION_UNIX_SOCKET) == NULL)
   {
     *error= memcached_set_errno(*ptr, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT);
     return NULL;