Skip to content

Commit

Permalink
INTERNAL: Remove unnecessary lines in collection API version check
Browse files Browse the repository at this point in the history
  • Loading branch information
ing-eoking authored and jhpark816 committed Jan 13, 2025
1 parent 46d063a commit 3499c5e
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions libmemcached/collection.cc
Original file line number Diff line number Diff line change
Expand Up @@ -195,23 +195,22 @@ static inline memcached_coll_type_t str_to_type(const char *value, size_t value_

static inline bool space_separated_keys_is_supported(memcached_server_write_instance_st instance)
{
if (instance->major_version != UINT8_MAX && instance->minor_version != UINT8_MAX)
if (instance->major_version == UINT8_MAX || instance->minor_version == UINT8_MAX)
{
if (instance->is_enterprise)
{
if (instance->major_version > 0 || (instance->major_version == 0 && instance->minor_version >= 7))
{
return true;
}
}
else
{
if (instance->major_version > 1 || (instance->major_version == 1 && instance->minor_version >= 11))
{
return true;
}
}
return false;
}

if (instance->is_enterprise)
{
if (instance->major_version > 0 || (instance->major_version == 0 && instance->minor_version >= 7))
return true;
}
else
{
if (instance->major_version > 1 || (instance->major_version == 1 && instance->minor_version >= 11))
return true;
}

return false;
}

Expand Down

0 comments on commit 3499c5e

Please sign in to comment.