Remove extra if
authorBrian Aker <brian@tangent.org>
Sat, 1 Feb 2014 10:06:55 +0000 (11:06 +0100)
committerBrian Aker <brian@tangent.org>
Sat, 1 Feb 2014 10:06:55 +0000 (11:06 +0100)
libmemcached/virtual_bucket.c

index 92c5dc45143d19ba61f80739447f1f667cb05163..951881bd390e42640fbda13bed64f2c230933451 100644 (file)
@@ -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;