From: Bingyin Zhang Date: Mon, 13 Nov 2017 10:47:46 +0000 (+0800) Subject: rgw.iam: change '1' to '1ULL' in function print_actions X-Git-Tag: v13.0.1~214^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cff5537d5f8b961bb2d874eccc71ca4d564adaf6;p=ceph.git rgw.iam: change '1' to '1ULL' in function print_actions * IAM has 54 operations corresponding to 54 bits. 1 is a signed integer * which can cover 31 operations, so we need 1ULL here. Signed-off-by: Bingyin Zhang --- diff --git a/src/rgw/rgw_iam_policy.cc b/src/rgw/rgw_iam_policy.cc index e07c7c02a9f2..6e732b3ca89c 100644 --- a/src/rgw/rgw_iam_policy.cc +++ b/src/rgw/rgw_iam_policy.cc @@ -1416,13 +1416,13 @@ ostream& print_actions(ostream& m, const uint64_t a) { bool begun = false; m << "[ "; for (auto i = 0U; i < s3Count; ++i) { - if (a & (1 << i)) { + if (a & (1ULL << i)) { if (begun) { - m << ", "; + m << ", "; } else { - begun = true; + begun = true; } - m << action_bit_string(1 << i); + m << action_bit_string(1ULL << i); } } if (begun) {