diff options
| author | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-19 21:02:05 +0100 |
|---|---|---|
| committer | Denys Vlasenko <vda.linux@googlemail.com> | 2010-01-19 21:02:05 +0100 |
| commit | 9edadbfa15ed05a3e48158aad89e438a6f9a9e50 (patch) | |
| tree | 225a0f3420b84a6097f11dd6351e83d14e10053b /lib | |
| parent | c781b46915c73f8f7b12efddd0357930eb1df8bb (diff) | |
| download | abrt-9edadbfa15ed05a3e48158aad89e438a6f9a9e50.tar.gz abrt-9edadbfa15ed05a3e48158aad89e438a6f9a9e50.tar.xz abrt-9edadbfa15ed05a3e48158aad89e438a6f9a9e50.zip | |
use get_crash_data_item_content() more widely. -4k.
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/Plugins/Bugzilla.cpp | 14 | ||||
| -rw-r--r-- | lib/Plugins/Catcut.cpp | 10 | ||||
| -rw-r--r-- | lib/Plugins/KerneloopsScanner.cpp | 5 |
3 files changed, 14 insertions, 15 deletions
diff --git a/lib/Plugins/Bugzilla.cpp b/lib/Plugins/Bugzilla.cpp index 5fdaa75..8a5a797 100644 --- a/lib/Plugins/Bugzilla.cpp +++ b/lib/Plugins/Bugzilla.cpp @@ -283,11 +283,11 @@ uint32_t ctx::new_bug(const map_crash_data_t& pCrashData) xmlrpc_env env; xmlrpc_env_init(&env); - std::string package = pCrashData.find(FILENAME_PACKAGE)->second[CD_CONTENT]; - std::string component = pCrashData.find(FILENAME_COMPONENT)->second[CD_CONTENT]; - std::string release = pCrashData.find(FILENAME_RELEASE)->second[CD_CONTENT]; - std::string arch = pCrashData.find(FILENAME_ARCHITECTURE)->second[CD_CONTENT]; - std::string uuid = pCrashData.find(CD_UUID)->second[CD_CONTENT]; + const std::string& package = get_crash_data_item_content(pCrashData, FILENAME_PACKAGE); + const std::string& component = get_crash_data_item_content(pCrashData, FILENAME_COMPONENT); + const std::string& release = get_crash_data_item_content(pCrashData, FILENAME_RELEASE); + const std::string& arch = get_crash_data_item_content(pCrashData, FILENAME_ARCHITECTURE); + const std::string& uuid = get_crash_data_item_content(pCrashData, CD_UUID); std::string summary = "[abrt] crash in " + package; std::string status_whiteboard = "abrt_hash:" + uuid; @@ -433,8 +433,8 @@ std::string CReporterBugzilla::Report(const map_crash_data_t& pCrashData, NoSSLVerify = m_bNoSSLVerify; } - std::string component = pCrashData.find(FILENAME_COMPONENT)->second[CD_CONTENT]; - std::string uuid = pCrashData.find(CD_UUID)->second[CD_CONTENT]; + const std::string& component = get_crash_data_item_content(pCrashData, FILENAME_COMPONENT); + const std::string& uuid = get_crash_data_item_content(pCrashData, CD_UUID); try { ctx bz_server(BugzillaXMLRPC.c_str(), NoSSLVerify); diff --git a/lib/Plugins/Catcut.cpp b/lib/Plugins/Catcut.cpp index 73316e7..1bc51f9 100644 --- a/lib/Plugins/Catcut.cpp +++ b/lib/Plugins/Catcut.cpp @@ -268,11 +268,11 @@ ctx::new_bug(const char *auth_cookie, const map_crash_data_t& pCrashData) xmlrpc_env env; xmlrpc_env_init(&env); - string package = pCrashData.find(FILENAME_PACKAGE)->second[CD_CONTENT]; - string component = pCrashData.find(FILENAME_COMPONENT)->second[CD_CONTENT]; - string release = pCrashData.find(FILENAME_RELEASE)->second[CD_CONTENT]; - string arch = pCrashData.find(FILENAME_ARCHITECTURE)->second[CD_CONTENT]; - string uuid = pCrashData.find(CD_UUID)->second[CD_CONTENT]; + const string& package = get_crash_data_item_content(pCrashData, FILENAME_PACKAGE); + const string& component = get_crash_data_item_content(pCrashData, FILENAME_COMPONENT); + const string& release = get_crash_data_item_content(pCrashData, FILENAME_RELEASE); + const string& arch = get_crash_data_item_content(pCrashData, FILENAME_ARCHITECTURE); + const string& uuid = get_crash_data_item_content(pCrashData, CD_UUID); string summary = "[abrt] crash in " + package; string status_whiteboard = "abrt_hash:" + uuid; diff --git a/lib/Plugins/KerneloopsScanner.cpp b/lib/Plugins/KerneloopsScanner.cpp index fe780a0..47043c2 100644 --- a/lib/Plugins/KerneloopsScanner.cpp +++ b/lib/Plugins/KerneloopsScanner.cpp @@ -52,8 +52,7 @@ void CKerneloopsScanner::Run(const char *pActionDir, const char *pArgs) { const char *syslog_file = "/var/log/messages"; map_plugin_settings_t::const_iterator it = m_pSettings.find("SysLogFile"); - if (it != m_pSettings.end()) - { + if (it != m_pSettings.end()) { syslog_file = it->second.c_str(); } @@ -203,4 +202,4 @@ void save_oops_to_debug_dump(CKerneloopsScanner *This) This->SaveOopsToDebugDump(); } -} +} /* extern "C" */ |
