]> git.ipfire.org Git - thirdparty/elfutils.git/commitdiff
dwarflint: Use stream operations for wr_form_leb128_messages
authorPetr Machata <pmachata@redhat.com>
Thu, 7 Apr 2011 14:46:03 +0000 (16:46 +0200)
committerPetr Machata <pmachata@redhat.com>
Thu, 7 Apr 2011 14:46:03 +0000 (16:46 +0200)
dwarflint/messages.cc

index 4d63e2e88e69be689367bc202b90fbd3137a18cd..586bc17f19a73a5dc96729e39c1e699e65226db8 100644 (file)
@@ -440,14 +440,14 @@ wr_format_leb128_message (struct where const *where,
                          const char *purpose,
                          const unsigned char *begin, const unsigned char *end)
 {
-  unsigned long category = mc_leb128 | mc_acc_bloat | mc_impact_3;
+  message_category category = mc_leb128 | mc_acc_bloat | mc_impact_3;
   char buf[(end - begin) * 3 + 1]; // 2 hexa digits+" " per byte, and term. 0
   char *ptr = buf;
   for (; begin < end; ++begin)
     ptr += sprintf (ptr, " %02x", *begin);
-  wr_message (category, where,
-             ": %s: value %s encoded as `%s'.\n",
-             what, purpose, buf + 1);
+  wr_message (*where, category)
+    << what << ": value " << purpose << " encoded as `"
+    << (buf + 1) << "'." << std::endl;
 }
 
 void