diff options
| author | Denys Vlasenko <dvlasenk@redhat.com> | 2010-12-08 15:03:24 +0100 |
|---|---|---|
| committer | Denys Vlasenko <dvlasenk@redhat.com> | 2010-12-08 15:03:24 +0100 |
| commit | def39238640489b41da5cdc8fd4a83d16d49fcc7 (patch) | |
| tree | 7700bf86d63e474ebf613c90b09d078aab333e88 /src/plugins | |
| parent | 816f3e001271ed8ab7fdadb6d90aeb2c61362dac (diff) | |
| download | abrt-def39238640489b41da5cdc8fd4a83d16d49fcc7.tar.gz abrt-def39238640489b41da5cdc8fd4a83d16d49fcc7.tar.xz abrt-def39238640489b41da5cdc8fd4a83d16d49fcc7.zip | |
removal of C++isms from libabrt, part 2
This patch rewrites a few places where we use C++ strings
Signed-off-by: Denys Vlasenko <dvlasenk@redhat.com>
Diffstat (limited to 'src/plugins')
| -rw-r--r-- | src/plugins/CCpp.cpp | 11 | ||||
| -rw-r--r-- | src/plugins/abrt-action-bugzilla.cpp | 10 |
2 files changed, 7 insertions, 14 deletions
diff --git a/src/plugins/CCpp.cpp b/src/plugins/CCpp.cpp index 11968349..19860290 100644 --- a/src/plugins/CCpp.cpp +++ b/src/plugins/CCpp.cpp @@ -258,17 +258,6 @@ void CAnalyzerCCpp::SetSettings(const map_plugin_settings_t& pSettings) } } -//ok to delete? -//const map_plugin_settings_t& CAnalyzerCCpp::GetSettings() -//{ -// m_pSettings["MemoryMap"] = m_bMemoryMap ? "yes" : "no"; -// m_pSettings["DebugInfo"] = m_sDebugInfo; -// m_pSettings["DebugInfoCacheMB"] = to_string(m_nDebugInfoCacheMB); -// m_pSettings["InstallDebugInfo"] = m_bInstallDebugInfo ? "yes" : "no"; -// -// return m_pSettings; -//} - PLUGIN_INFO(ANALYZER, CAnalyzerCCpp, "CCpp", diff --git a/src/plugins/abrt-action-bugzilla.cpp b/src/plugins/abrt-action-bugzilla.cpp index 8486662d..d1bd271a 100644 --- a/src/plugins/abrt-action-bugzilla.cpp +++ b/src/plugins/abrt-action-bugzilla.cpp @@ -567,7 +567,9 @@ int ctx::add_attachments(const char* bug_id_str, crash_data_t *crash_data) int ctx::get_bug_info(struct bug_info* bz, xmlrpc_int32 bug_id) { - xmlrpc_value* result = call("bugzilla.getBug", "(s)", to_string(bug_id).c_str()); + char bug_id_str[sizeof(long)*3 + 2]; + sprintf(bug_id_str, "%lu", (long)bug_id); + xmlrpc_value* result = call("bugzilla.getBug", "(s)", bug_id_str); if (!result) return -1; @@ -772,8 +774,10 @@ static void report_to_bugzilla( error_msg_and_die(_("Bugzilla entry creation failed")); } - log("Adding attachments to bug %d...", bug_id); - int ret = bz_server.add_attachments(to_string(bug_id).c_str(), crash_data); + log("Adding attachments to bug %ld...", (long)bug_id); + char bug_id_str[sizeof(long)*3 + 2]; + sprintf(bug_id_str, "%ld", (long) bug_id); + int ret = bz_server.add_attachments(bug_id_str, crash_data); if (ret == -1) { throw_if_xml_fault_occurred(&bz_server.env); |
