projects
/
m6w6
/
libmemcached
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
|
github
raw
|
inline
| side by side
Merge in backtrace
[m6w6/libmemcached]
/
libmemcached
/
common.h
diff --git
a/libmemcached/common.h
b/libmemcached/common.h
index 46230ce3169585f7a6c6f029e3dcecee022656e5..d4b2c7df3446660f26307541ec29a3560068767d 100644
(file)
--- a/
libmemcached/common.h
+++ b/
libmemcached/common.h
@@
-102,6
+102,11
@@
memcached_return_t memcached_server_execute(memcached_st *ptr,
#include <libmemcached/response.h>
#include <libmemcached/namespace.h>
#include <libmemcached/response.h>
#include <libmemcached/namespace.h>
+#ifdef __cplusplus
+#include <libmemcached/backtrace.hpp>
+#include <libmemcached/assert.hpp>
+#endif
+
/* string value */
struct memcached_continuum_item_st
{
/* string value */
struct memcached_continuum_item_st
{
@@
-164,20
+169,24
@@
LIBMEMCACHED_LOCAL
static inline memcached_return_t memcached_validate_key_length(size_t key_length, bool binary)
{
static inline memcached_return_t memcached_validate_key_length(size_t key_length, bool binary)
{
-
unlikely
(key_length == 0)
+
if
(key_length == 0)
{
return MEMCACHED_BAD_KEY_PROVIDED;
}
if (binary)
{
{
return MEMCACHED_BAD_KEY_PROVIDED;
}
if (binary)
{
- unlikely (key_length > 0xffff)
+ if (key_length > 0xffff)
+ {
return MEMCACHED_BAD_KEY_PROVIDED;
return MEMCACHED_BAD_KEY_PROVIDED;
+ }
}
else
{
}
else
{
- unlikely (key_length >= MEMCACHED_MAX_KEY)
+ if (key_length >= MEMCACHED_MAX_KEY)
+ {
return MEMCACHED_BAD_KEY_PROVIDED;
return MEMCACHED_BAD_KEY_PROVIDED;
+ }
}
return MEMCACHED_SUCCESS;
}
return MEMCACHED_SUCCESS;