From: Petr Machata Date: Thu, 7 Apr 2011 14:46:03 +0000 (+0200) Subject: dwarflint: Use stream operations for wr_form_leb128_messages X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=98cf8ee8739dd17c11822a7fd92400a254945a5d;p=thirdparty%2Felfutils.git dwarflint: Use stream operations for wr_form_leb128_messages --- diff --git a/dwarflint/messages.cc b/dwarflint/messages.cc index 4d63e2e88..586bc17f1 100644 --- a/dwarflint/messages.cc +++ b/dwarflint/messages.cc @@ -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