Fix for case where key may not be checked.
[awesomized/libmemcached] / libmemcached / key.hpp
index ddd557d88aadb903b330ce55a0d03da093b456ce..811a4b7bbd447ca882c5a8cfdae4c8c503e1dc08 100644 (file)
@@ -41,27 +41,3 @@ memcached_return_t memcached_key_test(memcached_st& memc,
                                       const size_t *key_length,
                                       size_t number_of_keys);
 
-static inline memcached_return_t memcached_validate_key_length(size_t key_length, bool binary)
-{
-  if (key_length == 0)
-  {
-    return MEMCACHED_BAD_KEY_PROVIDED;
-  }
-
-  if (binary)
-  {
-    if (key_length > 0xffff)
-    {
-      return MEMCACHED_BAD_KEY_PROVIDED;
-    }
-  }
-  else
-  {
-    if (key_length >= MEMCACHED_MAX_KEY)
-    {
-      return MEMCACHED_BAD_KEY_PROVIDED;
-    }
-  }
-
-  return MEMCACHED_SUCCESS;
-}