]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: do not print the leading "{" for Condition 18961/head
authorKefu Chai <kchai@redhat.com>
Thu, 16 Nov 2017 04:36:31 +0000 (12:36 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 16 Nov 2017 05:08:57 +0000 (13:08 +0800)
so the parentheses matches.

also add a space before the ending "}", so it looks better.

Reported-by: Bingyin Zhang <zhangbingyin@cloudin.cn>
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/rgw/rgw_iam_policy.cc

index dd11af883dd5e039fc9b4a42598e6032d0aa4330..2606765369aeabb8b27d82560dd484deb032e931 100644 (file)
@@ -1205,13 +1205,13 @@ ostream& print_dict(ostream& m, Iterator begin, Iterator end) {
 }
 
 ostream& operator <<(ostream& m, const Condition& c) {
-  m << "{ " << condop_string(c.op);
+  m << condop_string(c.op);
   if (c.ifexists) {
     m << "IfExists";
   }
   m << ": { " << c.key;
   print_array(m, c.vals.cbegin(), c.vals.cend());
-  return m << "}";
+  return m << " }";
 }
 
 Effect Statement::eval(const Environment& e,