const char *value,
size_t length)
{
- return memcached_string_append(&ptr->value, value, length);
+ memcached_return_t rc= memcached_string_append(&ptr->value, value, length);
+
+ if (rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE)
+ {
+ ((memcached_st *)ptr->root)->cached_errno= errno;
+ }
+
+ return rc;
}
const char *memcached_result_key_value(const memcached_result_st *self)
new_host_list= (memcached_server_write_instance_st)realloc(ptr, sizeof(memcached_server_st) * count);
if (!new_host_list)
{
+ ptr->cached_errno= errno;
*error= MEMCACHED_MEMORY_ALLOCATION_FAILURE;
return NULL;
}
new_value= libmemcached_realloc(string->root, string->string, new_size);
if (new_value == NULL)
+ {
return MEMCACHED_MEMORY_ALLOCATION_FAILURE;
+ }
string->string= new_value;
string->end= string->string + current_offset;
rc= _string_check(self, initial_size);
if (rc != MEMCACHED_SUCCESS)
{
+ if (rc == MEMCACHED_MEMORY_ALLOCATION_FAILURE)
+ {
+ ((memcached_st *)memc)->cached_errno= errno;
+ }
libmemcached_free(memc, self);
+
return NULL;
}
rc= _string_check(string, 1);
if (rc != MEMCACHED_SUCCESS)
+ {
return rc;
+ }
*string->end= character;
string->end++;
rc= _string_check(string, length);
if (rc != MEMCACHED_SUCCESS)
+ {
return rc;
+ }
WATCHPOINT_ASSERT(length <= string->current_size);
WATCHPOINT_ASSERT(string->string);
[ac_cv_safe_to_use_Wextra_=no])
CFLAGS="$save_CFLAGS"])
- BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
+ BASE_WARNINGS="${W_FAIL} -pedantic -Wall -Wswitch-enum -Wenum-compare -Wundef -Wshadow ${NO_UNUSED} ${F_DIAGNOSTICS_SHOW_OPTION} ${F_LOOP_PARALLELIZE_ALL} ${BASE_WARNINGS_FULL}"
AS_IF([test "$ac_cv_safe_to_use_Wextra_" = "yes"],
[BASE_WARNINGS="${BASE_WARNINGS} -Wextra"],
[BASE_WARNINGS="${BASE_WARNINGS} -W"])