From: liuchang0812 Date: Thu, 6 Apr 2017 02:15:13 +0000 (+0800) Subject: rgw: initialize is_truncated to false explicitly for function rgw_read_user_buckets X-Git-Tag: v12.0.2~109^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=e9289bb59081c981b95b8dba002f240d90804c48;p=ceph.git rgw: initialize is_truncated to false explicitly for function rgw_read_user_buckets Signed-off-by: liuchang0812 --- diff --git a/src/rgw/rgw_bucket.cc b/src/rgw/rgw_bucket.cc index 02b05c485b76..12aad46b1303 100644 --- a/src/rgw/rgw_bucket.cc +++ b/src/rgw/rgw_bucket.cc @@ -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, diff --git a/src/rgw/rgw_op.cc b/src/rgw/rgw_op.cc index 441ca6be0dff..5f96572b062a 100644 --- a/src/rgw/rgw_op.cc +++ b/src/rgw/rgw_op.cc @@ -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); diff --git a/src/rgw/rgw_user.cc b/src/rgw/rgw_user.cc index 94e40698c849..2a2f3dd386ab 100644 --- a/src/rgw/rgw_user.cc +++ b/src/rgw/rgw_user.cc @@ -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;