]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw_rados: initialize cur_shard 15735/head
authorAbhishek Lekshmanan <abhishek@suse.com>
Fri, 16 Jun 2017 17:39:19 +0000 (19:39 +0200)
committerAbhishek Lekshmanan <abhishek@suse.com>
Fri, 16 Jun 2017 17:39:19 +0000 (19:39 +0200)
valgrind reported an uninitialized value on use of cur_shard at a few
places, so explicitly declaring this to 0 as we are incrementing this
later

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
src/rgw/rgw_rados.cc

index 7c6c98821aca8e110e9c7d3d5d918af54bb67770..6dedd96b7cf34e6fdb70790dfd1c1b82f83348af 100644 (file)
@@ -3486,7 +3486,7 @@ class RGWIndexCompletionManager {
 
   int num_shards;
 
-  std::atomic<int> cur_shard;
+  std::atomic<int> cur_shard {0};
 
 
 public: