]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
common/buffer: use '\n' to replace with endl manipulator
authorChangcheng Liu <changcheng.liu@aliyun.com>
Thu, 26 Mar 2020 01:23:49 +0000 (09:23 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Sun, 14 Jun 2020 04:16:01 +0000 (12:16 +0800)
explictly use '\n' as the visual separator in between
buffers in the bufferlist.

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
src/common/buffer.cc

index 15ecd9626e0b4839fcab2cd132384743b2ec69e0..2e7cb35da46d4440a383ef7a31db5ec128c12004 100644 (file)
@@ -2165,15 +2165,15 @@ std::ostream& buffer::operator<<(std::ostream& out, const buffer::ptr& bp) {
 }
 
 std::ostream& buffer::operator<<(std::ostream& out, const buffer::list& bl) {
-  out << "buffer::list(len=" << bl.length() << "," << std::endl;
+  out << "buffer::list(len=" << bl.length() << ",\n";
 
   for (const auto& node : bl.buffers()) {
     out << "\t" << node;
     if (&node != &bl.buffers().back()) {
-      out << "," << std::endl;
+      out << ",\n";
     }
   }
-  out << std::endl << ")";
+  out << "\n)";
   return out;
 }