]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: initialize is_truncated to false explicitly for function rgw_read_user_buckets 14343/head
authorliuchang0812 <liuchang0812@gmail.com>
Thu, 6 Apr 2017 02:15:13 +0000 (10:15 +0800)
committerliuchang0812 <liuchang0812@gmail.com>
Thu, 6 Apr 2017 02:15:13 +0000 (10:15 +0800)
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
src/rgw/rgw_bucket.cc
src/rgw/rgw_op.cc
src/rgw/rgw_user.cc

index 02b05c485b767850ef4f2fa3530f5a419e740e4d..12aad46b1303783e5ad78c2621f31c20322d321f 100644 (file)
@@ -444,7 +444,7 @@ void check_bad_user_bucket_mapping(RGWRados *store, const rgw_user& user_id,
                                   bool fix)
 {
   RGWUserBuckets user_buckets;
-  bool is_truncated;
+  bool is_truncated = false;
   string marker;
 
   CephContext *cct = store->ctx();
@@ -1429,7 +1429,7 @@ int RGWBucketAdminOp::info(RGWRados *store, RGWBucketAdminOpState& op_state,
 
     RGWUserBuckets buckets;
     string marker;
-    bool is_truncated;
+    bool is_truncated = false;
 
     do {
       ret = rgw_read_user_buckets(store, op_state.get_user_id(), buckets,
index 441ca6be0dffd9d95c3424305e1a126fa1cfd414..5f96572b062a98a3096554a5334a23df21b70b46 100644 (file)
@@ -1576,6 +1576,7 @@ void RGWListBuckets::execute()
     }
   }
 
+  is_truncated = false;
   do {
     RGWUserBuckets buckets;
     uint64_t read_count;
@@ -1701,7 +1702,7 @@ int RGWStatAccount::verify_permission()
 void RGWStatAccount::execute()
 {
   string marker;
-  bool is_truncated;
+  bool is_truncated = false;
   uint64_t max_buckets = s->cct->_conf->rgw_list_buckets_max_chunk;
 
   do {
@@ -2027,7 +2028,7 @@ int RGWCreateBucket::verify_permission()
   if (s->user->max_buckets) {
     RGWUserBuckets buckets;
     string marker;
-    bool is_truncated;
+    bool is_truncated = false;
     op_ret = rgw_read_user_buckets(store, s->user->user_id, buckets,
                                   marker, string(), s->user->max_buckets,
                                   false, &is_truncated);
@@ -5562,7 +5563,7 @@ int RGWBulkUploadOp::handle_dir_verify_permission()
   if (s->user->max_buckets > 0) {
     RGWUserBuckets buckets;
     std::string marker;
-    bool is_truncated;
+    bool is_truncated = false;
     op_ret = rgw_read_user_buckets(store, s->user->user_id, buckets,
                                    marker, std::string(), s->user->max_buckets,
                                    false, &is_truncated);
index 94e40698c849c44170531832de5f42091d78d553..2a2f3dd386abff1dc2bb4f1434c38893a5e85dcc 100644 (file)
@@ -45,7 +45,7 @@ int rgw_user_sync_all_stats(RGWRados *store, const rgw_user& user_id)
 {
   CephContext *cct = store->ctx();
   size_t max_entries = cct->_conf->rgw_list_buckets_max_chunk;
-  bool is_truncated;
+  bool is_truncated = false;
   string marker;
   int ret;
   RGWObjectCtx obj_ctx(store);
@@ -2028,7 +2028,7 @@ int RGWUser::execute_remove(RGWUserAdminOpState& op_state, std::string *err_msg)
     return -ENOENT;
   }
 
-  bool is_truncated;
+  bool is_truncated = false;
   string marker;
   CephContext *cct = store->ctx();
   size_t max_buckets = cct->_conf->rgw_list_buckets_max_chunk;
@@ -2189,7 +2189,7 @@ int RGWUser::execute_modify(RGWUserAdminOpState& op_state, std::string *err_msg)
       return -EINVAL;
     }
 
-    bool is_truncated;
+    bool is_truncated = false;
     string marker;
     CephContext *cct = store->ctx();
     size_t max_buckets = cct->_conf->rgw_list_buckets_max_chunk;