summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenys Vlasenko <vda.linux@googlemail.com>2009-12-10 18:26:37 +0100
committerDenys Vlasenko <vda.linux@googlemail.com>2009-12-10 18:26:37 +0100
commit7ee6b78b9f901e84be31117940ab7ab8af631e9d (patch)
treeeed9d17a3854b7f160f4eb545b57a654cbecc9cf
parent28ce06fe5aacf7ba175a2d43981f43990064a621 (diff)
downloadabrt-7ee6b78b9f901e84be31117940ab7ab8af631e9d.tar.gz
abrt-7ee6b78b9f901e84be31117940ab7ab8af631e9d.tar.xz
abrt-7ee6b78b9f901e84be31117940ab7ab8af631e9d.zip
remove one case when we write data needlessly; remove 2 unused funcs
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r--inc/abrtlib.h2
-rw-r--r--lib/Utils/logging.cpp10
-rw-r--r--src/Daemon/MiddleWare.cpp6
3 files changed, 3 insertions, 15 deletions
diff --git a/inc/abrtlib.h b/inc/abrtlib.h
index 7f746280..2227ef33 100644
--- a/inc/abrtlib.h
+++ b/inc/abrtlib.h
@@ -76,9 +76,7 @@ void log_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
void error_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
void error_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
void perror_msg(const char *s, ...) __attribute__ ((format (printf, 1, 2)));
-void simple_perror_msg(const char *s);
void perror_msg_and_die(const char *s, ...) __attribute__ ((noreturn, format (printf, 1, 2)));
-void simple_perror_msg_and_die(const char *s) NORETURN;
void perror_nomsg_and_die(void) NORETURN;
void perror_nomsg(void);
void verror_msg(const char *s, va_list p, const char *strerr);
diff --git a/lib/Utils/logging.cpp b/lib/Utils/logging.cpp
index cae609bc..db952d17 100644
--- a/lib/Utils/logging.cpp
+++ b/lib/Utils/logging.cpp
@@ -118,16 +118,6 @@ void perror_msg(const char *s, ...)
va_end(p);
}
-void simple_perror_msg_and_die(const char *s)
-{
- perror_msg_and_die("%s", s);
-}
-
-void simple_perror_msg(const char *s)
-{
- perror_msg("%s", s);
-}
-
void die_out_of_memory(void)
{
error_msg_and_die("Out of memory, exiting");
diff --git a/src/Daemon/MiddleWare.cpp b/src/Daemon/MiddleWare.cpp
index e7757648..e483f3fe 100644
--- a/src/Daemon/MiddleWare.cpp
+++ b/src/Daemon/MiddleWare.cpp
@@ -427,12 +427,12 @@ report_status_t Report(const map_crash_report_t& pCrashReport,
std::string packageNVR = pCrashReport.find(FILENAME_PACKAGE)->second[CD_CONTENT];
std::string packageName = packageNVR.substr(0, packageNVR.rfind("-", packageNVR.rfind("-") - 1));
- // Save comments and how to reproduciton
+ // Save comment and "how to reproduce"
map_crash_report_t::const_iterator it_comment = pCrashReport.find(CD_COMMENT);
map_crash_report_t::const_iterator it_reproduce = pCrashReport.find(CD_REPRODUCE);
- std::string pDumpDir = getDebugDumpDir(UUID.c_str(), UID.c_str());
-
+ if (it_comment != pCrashReport.end() || it_reproduce != pCrashReport.end())
{
+ std::string pDumpDir = getDebugDumpDir(UUID.c_str(), UID.c_str());
CDebugDump dd;
dd.Open(pDumpDir.c_str());
if (it_comment != pCrashReport.end())