X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=libmemcached%2Fcommon.h;h=49d309c8759ed0a2a8e7f2f788bb2b03eda02203;hb=647f5b82467172c55e456b6833d4c2f0bdc0bc5a;hp=f30589ca8be21382c9a76daedec406149ff54af5;hpb=32767cce940f7bcde4633cc3cd23efc28ad954bd;p=awesomized%2Flibmemcached diff --git a/libmemcached/common.h b/libmemcached/common.h index f30589ca..49d309c8 100644 --- a/libmemcached/common.h +++ b/libmemcached/common.h @@ -92,7 +92,11 @@ memcached_return_t memcached_server_execute(memcached_st *ptr, #include #include #include +#ifdef __cplusplus +#include +#include #include +#endif #include #include #include @@ -103,6 +107,7 @@ memcached_return_t memcached_server_execute(memcached_st *ptr, #include #ifdef __cplusplus +#include #include #endif @@ -168,20 +173,24 @@ LIBMEMCACHED_LOCAL 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) { - unlikely (key_length > 0xffff) + if (key_length > 0xffff) + { return MEMCACHED_BAD_KEY_PROVIDED; + } } else { - unlikely (key_length >= MEMCACHED_MAX_KEY) + if (key_length >= MEMCACHED_MAX_KEY) + { return MEMCACHED_BAD_KEY_PROVIDED; + } } return MEMCACHED_SUCCESS;