projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Simple addition to valgrind test.
[m6w6/libmemcached]
/
libmemcached
/
prefix_key.cc
diff --git
a/libmemcached/prefix_key.cc
b/libmemcached/prefix_key.cc
index 526f5fac30796c3f437914041899fdb8dc1a3c59..8a24190e17972550cc91397fee28e5380f656dfc 100644
(file)
--- a/
libmemcached/prefix_key.cc
+++ b/
libmemcached/prefix_key.cc
@@
-39,19
+39,21
@@
memcached_return_t memcached_set_prefix_key(memcached_st *self, const char *key, size_t key_length)
{
memcached_return_t memcached_set_prefix_key(memcached_st *self, const char *key, size_t key_length)
{
- if (key && key_length)
+ WATCHPOINT_ASSERT(self);
+
+ if (key and key_length)
{
if (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED)
{
if (memcached_key_test((const char **)&key, &key_length, 1) == MEMCACHED_BAD_KEY_PROVIDED)
- return memcached_set_error(
self, MEMCACHED_BAD_KEY_PROVIDED, NULL
);
+ return memcached_set_error(
*self, MEMCACHED_BAD_KEY_PROVIDED, MEMCACHED_AT
);
if ((key_length > MEMCACHED_PREFIX_KEY_MAX_SIZE -1))
if ((key_length > MEMCACHED_PREFIX_KEY_MAX_SIZE -1))
- return memcached_set_error(
self, MEMCACHED_KEY_TOO_BIG, NULL
);
+ return memcached_set_error(
*self, MEMCACHED_KEY_TOO_BIG, MEMCACHED_AT
);
memcached_array_free(self->prefix_key);
self->prefix_key= memcached_strcpy(self, key, key_length);
memcached_array_free(self->prefix_key);
self->prefix_key= memcached_strcpy(self, key, key_length);
- if (
!
self->prefix_key)
- return memcached_set_error(
self, MEMCACHED_MEMORY_ALLOCATION_FAILURE, NULL
);
+ if (
not
self->prefix_key)
+ return memcached_set_error(
*self, MEMCACHED_MEMORY_ALLOCATION_FAILURE, MEMCACHED_AT
);
}
else
{
}
else
{