From 5d4007c22e67b3d68a2bb19ef28970408133c572 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 31 Jul 2009 04:38:41 +0200 Subject: rename auto variables to not have m_ prefixes - they are not members! no logic changes Signed-off-by: Denys Vlasenko --- lib/Plugins/KerneloopsScanner.cpp | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'lib/Plugins/KerneloopsScanner.cpp') diff --git a/lib/Plugins/KerneloopsScanner.cpp b/lib/Plugins/KerneloopsScanner.cpp index a2e186bc..3134d342 100644 --- a/lib/Plugins/KerneloopsScanner.cpp +++ b/lib/Plugins/KerneloopsScanner.cpp @@ -14,7 +14,6 @@ #include -#define MIN(A,B) ((A) < (B) ? (A) : (B)) #define FILENAME_KERNELOOPS "kerneloops" void CKerneloopsScanner::Run(const std::string& pActionDir, @@ -42,40 +41,38 @@ void CKerneloopsScanner::SaveOopsToDebugDump() { comm_layer_inner_status("Creating kernel oops crash reports..."); - CDebugDump m_pDebugDump; - char m_sPath[PATH_MAX]; - std::list m_pOopsList; + CDebugDump debugDump; + char path[PATH_MAX]; + std::list oopsList; time_t t = time(NULL); - m_pOopsList = m_pSysLog.GetOopsList(); + oopsList = m_pSysLog.GetOopsList(); m_pSysLog.ClearOopsList(); - while (!m_pOopsList.empty()) + while (!oopsList.empty()) { - snprintf(m_sPath, sizeof(m_sPath), "%s/kerneloops-%ld-%ld", DEBUG_DUMPS_DIR, (long)t, (long)m_pOopsList.size()); + snprintf(path, sizeof(path), "%s/kerneloops-%lu-%lu", DEBUG_DUMPS_DIR, (long)t, (long)oopsList.size()); - COops m_pOops; - m_pOops = m_pOopsList.back(); + COops oops = oopsList.back(); try { - m_pDebugDump.Create(m_sPath, "0"); - m_pDebugDump.SaveText(FILENAME_ANALYZER, "Kerneloops"); - m_pDebugDump.SaveText(FILENAME_EXECUTABLE, "kernel"); - m_pDebugDump.SaveText(FILENAME_KERNEL, m_pOops.m_sVersion); - m_pDebugDump.SaveText(FILENAME_PACKAGE, "not_applicable"); - m_pDebugDump.SaveText(FILENAME_KERNELOOPS, m_pOops.m_sData); - m_pDebugDump.Close(); + debugDump.Create(path, "0"); + debugDump.SaveText(FILENAME_ANALYZER, "Kerneloops"); + debugDump.SaveText(FILENAME_EXECUTABLE, "kernel"); + debugDump.SaveText(FILENAME_KERNEL, oops.m_sVersion); + debugDump.SaveText(FILENAME_PACKAGE, "not_applicable"); + debugDump.SaveText(FILENAME_KERNELOOPS, oops.m_sData); + debugDump.Close(); } catch (CABRTException& e) { - throw CABRTException(EXCEP_PLUGIN, "CAnalyzerKerneloops::Report(): " + e.what()); + throw CABRTException(EXCEP_PLUGIN, std::string(__func__) + ": " + e.what()); } - m_pOopsList.pop_back(); + oopsList.pop_back(); } } - int CKerneloopsScanner::ScanDmesg() { comm_layer_inner_debug("Scanning dmesg..."); -- cgit