From a7001dfd139fbb9d5cf5434fc40370f8da0cf04c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 28 Jul 2012 12:35:00 +0000 Subject: perversive error reporting schema in DATABASELINK removed git-svn-id: http://svn.miranda-ng.org/main/trunk@1223 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/database/database.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/modules/database/database.cpp') diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp index 71ad7102ce..24b220cd44 100644 --- a/src/modules/database/database.cpp +++ b/src/modules/database/database.cpp @@ -359,7 +359,7 @@ int makeDatabase(TCHAR *profile, DATABASELINK * link, HWND hwndDlg) } // ask the database to create the profile CreatePathToFileT(profile); - if (link->makeDatabase(profile, &err)) { + if ((err = link->makeDatabase(profile)) != ERROR_SUCCESS) { mir_sntprintf(buf, SIZEOF(buf), TranslateT("Unable to create the profile '%s', the error was %x"), file, err); MessageBox(hwndDlg, buf, TranslateT("Problem creating profile"), MB_ICONERROR|MB_OK); return 0; @@ -376,8 +376,8 @@ int tryOpenDatabase(const TCHAR* tszProfile) DATABASELINK* p = arDbPlugins[i]; // liked the profile? - int err = 0; - if ( p->grokHeader(tszProfile, &err) == 0) { + int err = p->grokHeader(tszProfile); + if (err == ERROR_SUCCESS) { // added APIs? MIDatabase* pDb = p->Load(tszProfile); if (pDb) { @@ -413,8 +413,8 @@ static int tryCreateDatabase(const TCHAR* ptszProfile) for (int i=0; i < arDbPlugins.getCount(); i++) { DATABASELINK* p = arDbPlugins[i]; - int err; - if (p->makeDatabase(tszProfile, &err) == 0) { + int err = p->makeDatabase(tszProfile); + if (err == ERROR_SUCCESS) { if ( !p->Load(tszProfile)) { fillProfileName(tszProfile); return 0; -- cgit v1.2.3