From 64be7b89afc0822cf24aeeec588ff5f5af5fe8b4 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 18 Sep 2009 17:32:01 +0200 Subject: remove a few C++-isms where they did not buy any convenience anyway text data bss dec hex filename 182372 2624 2320 187316 2dbb4 abrt.t2/abrt-0.0.8.5/src/Daemon/.libs/abrtd 180635 2584 1968 185187 2d363 abrt.t3/abrt-0.0.8.5/src/Daemon/.libs/abrtd 34110 1340 768 36218 8d7a abrt.t2/abrt-0.0.8.5/src/CLI/.libs/abrt-cli 30202 1292 224 31718 7be6 abrt.t3/abrt-0.0.8.5/src/CLI/.libs/abrt-cli 22116 1688 376 24180 5e74 abrt.t2/abrt-0.0.8.5/src/Applet/.libs/abrt-applet 21254 1648 88 22990 59ce abrt.t3/abrt-0.0.8.5/src/Applet/.libs/abrt-applet Signed-off-by: Denys Vlasenko --- lib/Utils/DebugDump.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'lib') diff --git a/lib/Utils/DebugDump.cpp b/lib/Utils/DebugDump.cpp index 03fb7c64..4d6d92c3 100644 --- a/lib/Utils/DebugDump.cpp +++ b/lib/Utils/DebugDump.cpp @@ -106,7 +106,6 @@ static int GetAndSetLock(const char* pLockFile, const char* pPID) if (errno != EEXIST) perror_msg_and_die("Can't create lock file '%s'", pLockFile); fd = open(pLockFile, O_RDONLY); -log("opened O_RDONLY: '%s'", pLockFile); if (fd < 0) { if (errno == ENOENT) @@ -125,7 +124,6 @@ log("opened O_RDONLY: '%s'", pLockFile); continue; } pid_buf[r] = '\0'; -log("read: '%s'", pid_buf); if (strcmp(pid_buf, pPID) == 0) { log("Lock file '%s' is already locked by us", pLockFile); @@ -143,7 +141,6 @@ log("read: '%s'", pid_buf); /* The file may be deleted by now by other process. Ignore errors */ unlink(pLockFile); } -log("created O_EXCL: '%s'", pLockFile); int len = strlen(pPID); if (write(fd, pPID, len) != len) @@ -331,10 +328,8 @@ void CDebugDump::SaveKernelArchitectureRelease() void CDebugDump::SaveTime() { - std::stringstream ss; time_t t = time(NULL); - ss << t; - SaveText(FILENAME_TIME, ss.str()); + SaveText(FILENAME_TIME, to_string(t)); } static void LoadTextFile(const std::string& pPath, std::string& pData) -- cgit