From d4cdfdff42c777f5929017c1f26ecaed3d055cde Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Thu, 27 Aug 2009 15:15:35 +0200 Subject: simplify error handling. CrashWatcher.cpp lost a few wrapper functions -4k of code Signed-off-by: Denys Vlasenko --- lib/Plugins/FileTransfer.cpp | 3 +-- lib/Plugins/SQLite3.cpp | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/Plugins/FileTransfer.cpp b/lib/Plugins/FileTransfer.cpp index dbda17f..76dbb07 100644 --- a/lib/Plugins/FileTransfer.cpp +++ b/lib/Plugins/FileTransfer.cpp @@ -106,8 +106,7 @@ void CFileTransfer::SendFile(const std::string& pURL, fclose(f); } /*retry the upload if not succesful, wait a bit before next try*/ - while( result!=0 && count-- != 0 && (sleep(m_nRetryDelay),1) ); - + while (result != 0 && --count >= 0 && (sleep(m_nRetryDelay), 1)); } void CFileTransfer::CreateArchive(const std::string& pArchiveName, diff --git a/lib/Plugins/SQLite3.cpp b/lib/Plugins/SQLite3.cpp index 57b3317..a57da24 100644 --- a/lib/Plugins/SQLite3.cpp +++ b/lib/Plugins/SQLite3.cpp @@ -333,7 +333,6 @@ void CSQLite3::SetReported(const std::string& pUUID, const std::string& pUID, co "SET "DATABASE_COLUMN_MESSAGE" = '" + pMessage + "' " "WHERE "DATABASE_COLUMN_UUID" = '"+pUUID+"' " "AND "DATABASE_COLUMN_UID" = '"+pUID+"';"); - } else { -- cgit