From c781b46915c73f8f7b12efddd0357930eb1df8bb Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Tue, 19 Jan 2010 18:08:01 +0100 Subject: move all FILENAME_xxx defines to inc/CrashTypes.h Signed-off-by: Denys Vlasenko --- lib/Plugins/Firefox.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'lib/Plugins/Firefox.cpp') diff --git a/lib/Plugins/Firefox.cpp b/lib/Plugins/Firefox.cpp index d980755..e8b12f5 100644 --- a/lib/Plugins/Firefox.cpp +++ b/lib/Plugins/Firefox.cpp @@ -36,10 +36,6 @@ #define CORE_PATTERN_IFACE "/proc/sys/kernel/core_pattern" #define CORE_PATTERN "|"CCPP_HOOK_PATH" "DEBUG_DUMPS_DIR" %p %s %u" -#define FILENAME_COREDUMP "coredump" -#define FILENAME_BACKTRACE "backtrace" -#define FILENAME_MEMORYMAP "memorymap" - #define DEBUGINFO_CACHE_DIR LOCALSTATEDIR"/cache/abrt-di" CAnalyzerFirefox::CAnalyzerFirefox() : @@ -227,7 +223,7 @@ static int rate_backtrace(const char *backtrace) } } - /* Bogus "backtrace" with zero frames? */ + /* Bogus 'backtrace' with zero frames? */ if (best_possible_rating == 0) return 0; -- cgit From 8cf58297d9743bdbfdddb605cc9cefe0c6273ee5 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 21 Jan 2010 18:45:21 +0100 Subject: TicketUploader and FileTransfer plugins: fixes after a round of testing for one, FileTransfer now would not use current dir as a storage for temp files. Signed-off-by: Denys Vlasenko --- lib/Plugins/Firefox.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'lib/Plugins/Firefox.cpp') diff --git a/lib/Plugins/Firefox.cpp b/lib/Plugins/Firefox.cpp index e8b12f5..98d892b 100644 --- a/lib/Plugins/Firefox.cpp +++ b/lib/Plugins/Firefox.cpp @@ -623,9 +623,7 @@ Another application is holding the yum lock, cannot continue std::string packageName = package.substr(0, package.rfind("-", package.rfind("-")-1)); while (fgets(buff, sizeof(buff), pipeout_fp)) { - int last = strlen(buff) - 1; - if (last >= 0 && buff[last] == '\n') - buff[last] = '\0'; + strchrnul(buff, '\n')[0] = '\0'; log("%s", buff); update_client("%s", buff); /* maybe only if buff != ""? */ @@ -712,9 +710,7 @@ static void InstallDebugInfos(const char *pDebugDumpDir, std::string& build_ids) char buff[1024]; while (fgets(buff, sizeof(buff), pipeout_fp)) { - int last = strlen(buff) - 1; - if (last >= 0 && buff[last] == '\n') - buff[last] = '\0'; + strchrnul(buff, '\n')[0] = '\0'; if (strncmp(buff, "MISSING:", 8) == 0) { -- cgit