From 212b9cda43dfdb1a6a5790a2365906e9887c678a Mon Sep 17 00:00:00 2001 From: Brian Aker Date: Sat, 1 Feb 2014 11:06:55 +0100 Subject: [PATCH] Remove extra if --- libmemcached/virtual_bucket.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/libmemcached/virtual_bucket.c b/libmemcached/virtual_bucket.c index 92c5dc45..951881bd 100644 --- a/libmemcached/virtual_bucket.c +++ b/libmemcached/virtual_bucket.c @@ -109,14 +109,11 @@ uint32_t memcached_virtual_bucket_get(const memcached_st *self, uint32_t digest) { if (self->virtual_bucket) { - if (self->virtual_bucket) - { - uint32_t result= (uint32_t) (digest & (self->virtual_bucket->size -1)); - return self->virtual_bucket->buckets[result].master; - } - - return (uint32_t) (digest & (self->number_of_hosts -1)); + uint32_t result= (uint32_t) (digest & (self->virtual_bucket->size -1)); + return self->virtual_bucket->buckets[result].master; } + + return (uint32_t) (digest & (self->number_of_hosts -1)); } return 0; -- 2.30.2