From f1931bb8749b3d6f224065e7e60684bb08dfae13 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 27 Oct 2009 12:01:46 +0100 Subject: simplify messags handling text data bss dec hex filename 38598 1840 288 40726 9f16 old/libBugzilla.so 38474 1840 288 40602 9e9a new/libBugzilla.so 37433 2144 24 39601 9ab1 old/libFileTransfer.so 37382 2144 24 39550 9a7e new/libFileTransfer.so Signed-off-by: Denys Vlasenko --- lib/Plugins/Bugzilla.cpp | 5 ++--- lib/Plugins/FileTransfer.cpp | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp index 2da3908..dcabf1a 100644 --- a/lib/Plugins/Bugzilla.cpp +++ b/lib/Plugins/Bugzilla.cpp @@ -293,9 +293,8 @@ static void create_new_bug_description(const map_crash_report_t& pCrashReport, s } else if (it->second[CD_TYPE] == CD_BIN) { - char buffer[1024]; - snprintf(buffer, 1024, _("Binary file %s will not be reported."), it->first.c_str()); - warn_client(std::string(buffer)); + std::string msg = ssprintf(_("Binary file %s will not be reported."), it->first.c_str()); + warn_client(msg); //update_client(_("Binary file ")+it->first+_(" will not be reported.")); } } diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp index 3492156..0573c51 100644 --- a/lib/Plugins/FileTransfer.cpp +++ b/lib/Plugins/FileTransfer.cpp @@ -77,9 +77,8 @@ void CFileTransfer::SendFile(const std::string& pURL, } } - char buffer[1024]; - snprintf(buffer, 1024, _("Sending archive %s via %s"), pFilename.c_str(), protocol.c_str()); - update_client(buffer); + std::string msg = ssprintf(_("Sending archive %s via %s"), pFilename.c_str(), protocol.c_str()); + update_client(msg.c_str()); std::string wholeURL; if (pURL[len-1] == '/') -- cgit