{
char* value= NULL;
- if (memcached_string_length(self))
+ assert_msg(self, "Invalid memcached_string_st");
+ if (self)
{
- assert_msg(self, "Invalid memcached_string_st");
- // If we fail at adding the null, we copy and move on
- if (memcached_success(memcached_string_append_null(self)))
+ if (memcached_string_length(self))
{
- return memcached_string_c_copy(self);
+ // If we fail at adding the null, we copy and move on
+ if (memcached_failed(memcached_string_append_null(self)))
+ {
+ return NULL;
+ }
+
+ value= self->string;
+ _init_string(self);
}
-
- value= self->string;
-
- _init_string(self);
}
return value;