]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mds/mdstypes.cc
update ceph source to reef 18.2.0
[ceph.git] / ceph / src / mds / mdstypes.cc
index d8b03915a0030c1666e5263785c06138fa349f24..a914b9f3015dbc04a6157f0aff8de1a22b83a601 100644 (file)
@@ -492,10 +492,15 @@ void feature_bitset_t::dump(Formatter *f) const {
 void feature_bitset_t::print(ostream& out) const
 {
   std::ios_base::fmtflags f(out.flags());
-  out << "0x";
-  for (int i = _vec.size() - 1; i >= 0; --i)
-    out << std::setfill('0') << std::setw(sizeof(block_type) * 2)
-        << std::hex << _vec[i];
+  int size = _vec.size();
+  if (!size) {
+    out << "0x0";
+  } else {
+    out << "0x";
+    for (int i = size - 1; i >= 0; --i)
+      out << std::setfill('0') << std::setw(sizeof(block_type) * 2)
+          << std::hex << _vec[i];
+  }
   out.flags(f);
 }