/*
+--------------------------------------------------------------------+
- | libmemcached - C/C++ Client Library for memcached |
+ | libmemcached-awesome - C/C++ Client Library for memcached |
+--------------------------------------------------------------------+
| Redistribution and use in source and binary forms, with or without |
| modification, are permitted under the terms of the BSD license. |
return "set ";
}
-static inline bool can_by_encrypted(const memcached_storage_action_t verb) {
+static inline bool can_be_encrypted(const memcached_storage_action_t verb) {
switch (verb) {
case SET_OP:
case ADD_OP:
memcached_literal_param("snprintf(MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH)"));
}
- char expiration_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH + 1];
- int expiration_buffer_length = snprintf(expiration_buffer, sizeof(expiration_buffer), " %llu",
- (unsigned long long) expiration);
+ char expiration_buffer[MEMCACHED_MAXIMUM_INTEGER_DISPLAY_LENGTH + 1 + 1];
+ int expiration_buffer_length = snprintf(expiration_buffer, sizeof(expiration_buffer), " %lld",
+ (long long) expiration);
if (size_t(expiration_buffer_length) >= sizeof(expiration_buffer) or expiration_buffer_length < 0)
{
return memcached_set_error(
hashkit_string_st *destination = NULL;
if (memcached_is_encrypted(ptr)) {
- if (can_by_encrypted(verb) == false) {
+ if (can_be_encrypted(verb) == false) {
return memcached_set_error(
*ptr, MEMCACHED_NOT_SUPPORTED, MEMCACHED_AT,
memcached_literal_param("Operation not allowed while encyrption is enabled"));