From 78c0815c4118fe24ab78cce2dc48a6232dcd824a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 2 Jun 2012 20:55:18 +0000 Subject: - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@270 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Db3x/dbcache.c | 2 +- plugins/Db3x/dbcontacts.c | 2 +- plugins/Db3x/dbevents.c | 12 ++++++------ plugins/Db3x/dbsettings.c | 12 ++++++------ 4 files changed, 14 insertions(+), 14 deletions(-) (limited to 'plugins/Db3x') diff --git a/plugins/Db3x/dbcache.c b/plugins/Db3x/dbcache.c index 4cf338bfb9..9e8cbc7a76 100644 --- a/plugins/Db3x/dbcache.c +++ b/plugins/Db3x/dbcache.c @@ -186,7 +186,7 @@ static VOID CALLBACK DoBufferFlushTimerProc(HWND hwnd,UINT message,UINT_PTR idEv void DBFlush(int setting) { - if(!setting) { + if (!setting) { log0("nflush1"); if(safetyMode) FlushFileBuffers(hDbFile); log0("nflush2"); diff --git a/plugins/Db3x/dbcontacts.c b/plugins/Db3x/dbcontacts.c index eb5d13d52c..03f248457e 100644 --- a/plugins/Db3x/dbcontacts.c +++ b/plugins/Db3x/dbcontacts.c @@ -145,7 +145,7 @@ static INT_PTR DeleteContact(WPARAM wParam,LPARAM lParam) struct DBEvent *dbe; int index; - if((HANDLE)wParam==NULL) return 1; + if ((HANDLE)wParam==NULL) return 1; EnterCriticalSection(&csDbAccess); dbc=(struct DBContact*)DBRead(wParam,sizeof(struct DBContact),NULL); if(dbc->signature!=DBCONTACT_SIGNATURE) { diff --git a/plugins/Db3x/dbevents.c b/plugins/Db3x/dbevents.c index 39de07d187..aff845b76b 100644 --- a/plugins/Db3x/dbevents.c +++ b/plugins/Db3x/dbevents.c @@ -137,7 +137,7 @@ static INT_PTR AddEvent(WPARAM wParam,LPARAM lParam) // Loop through the chain, starting at the end ofsThis = dbc.ofsLastEvent; dbeTest = (struct DBEvent*)DBRead(ofsThis, sizeof(struct DBEvent), NULL); - for(;;) { + for (;;) { // If the new event's timesstamp is equal to or greater than the // current dbevent, it will be inserted after. If not, continue // with the previous dbevent in chain. @@ -161,7 +161,7 @@ static INT_PTR AddEvent(WPARAM wParam,LPARAM lParam) } } dbc.eventCount++; - if(!(dbe.flags&(DBEF_READ|DBEF_SENT))) { + if (!(dbe.flags&(DBEF_READ|DBEF_SENT))) { if(dbe.timestampofsNext==0) { dbc.ofsFirstUnreadEvent=0; dbc.timestampFirstUnread=0; @@ -211,7 +211,7 @@ static INT_PTR DeleteEvent(WPARAM wParam,LPARAM lParam) } ofsThis=dbeNext->ofsNext; dbeNext=(struct DBEvent*)DBRead(ofsThis,sizeof(struct DBEvent),NULL); - if(!(dbeNext->flags&(DBEF_READ|DBEF_SENT))) { + if (!(dbeNext->flags&(DBEF_READ|DBEF_SENT))) { dbc.ofsFirstUnreadEvent=ofsThis; dbc.timestampFirstUnread=dbeNext->timestamp; break; @@ -331,7 +331,7 @@ static INT_PTR MarkEventRead(WPARAM wParam,LPARAM lParam) DBWrite(lParam,dbe,sizeof(struct DBEvent)); ret=(INT_PTR)dbe->flags; if(dbc.ofsFirstUnreadEvent==(DWORD)lParam) { - for(;;) { + for (;;) { if(dbe->ofsNext==0) { dbc.ofsFirstUnreadEvent=0; dbc.timestampFirstUnread=0; @@ -339,7 +339,7 @@ static INT_PTR MarkEventRead(WPARAM wParam,LPARAM lParam) } ofsThis=dbe->ofsNext; dbe=(struct DBEvent*)DBRead(ofsThis,sizeof(struct DBEvent),NULL); - if(!(dbe->flags&(DBEF_READ|DBEF_SENT))) { + if (!(dbe->flags&(DBEF_READ|DBEF_SENT))) { dbc.ofsFirstUnreadEvent=ofsThis; dbc.timestampFirstUnread=dbe->timestamp; break; diff --git a/plugins/Db3x/dbsettings.c b/plugins/Db3x/dbsettings.c index 590eddc2e8..16bf2aa2bb 100644 --- a/plugins/Db3x/dbsettings.c +++ b/plugins/Db3x/dbsettings.c @@ -65,7 +65,7 @@ static DWORD GetSettingsGroupOfsByModuleNameOfs(struct DBContact *dbc,DWORD ofsC settingsGroupOfsCache[nextSGOCacheEntry].ofsContact=ofsContact; settingsGroupOfsCache[nextSGOCacheEntry].ofsModuleName=ofsModuleName; settingsGroupOfsCache[nextSGOCacheEntry].ofsSettingsGroup=ofsThis; - if(++nextSGOCacheEntry==SETTINGSGROUPOFSCOUNT) nextSGOCacheEntry=0; + if (++nextSGOCacheEntry==SETTINGSGROUPOFSCOUNT) nextSGOCacheEntry=0; return ofsThis; } ofsThis=dbcs->ofsNext; @@ -319,7 +319,7 @@ static __inline int GetContactSettingWorker(HANDLE hContact,DBCONTACTGETSETTING NeedBytes(3+*(PWORD)(pBlob+1)); if(isStatic) { dbcgs->pValue->cchVal--; - if(*(PWORD)(pBlob+1)pValue->cchVal) dbcgs->pValue->cchVal=*(PWORD)(pBlob+1); + if (*(PWORD)(pBlob+1)pValue->cchVal) dbcgs->pValue->cchVal=*(PWORD)(pBlob+1); CopyMemory(dbcgs->pValue->pszVal,pBlob+3,dbcgs->pValue->cchVal); dbcgs->pValue->pszVal[dbcgs->pValue->cchVal]=0; dbcgs->pValue->cchVal=*(PWORD)(pBlob+1); @@ -333,7 +333,7 @@ static __inline int GetContactSettingWorker(HANDLE hContact,DBCONTACTGETSETTING case DBVT_BLOB: NeedBytes(3+*(PWORD)(pBlob+1)); if(isStatic) { - if(*(PWORD)(pBlob+1)pValue->cpbVal) dbcgs->pValue->cpbVal=*(PWORD)(pBlob+1); + if (*(PWORD)(pBlob+1)pValue->cpbVal) dbcgs->pValue->cpbVal=*(PWORD)(pBlob+1); CopyMemory(dbcgs->pValue->pbVal,pBlob+3,dbcgs->pValue->cpbVal); } else { @@ -716,7 +716,7 @@ static INT_PTR WriteContactSetting(WPARAM wParam,LPARAM lParam) else bytesRequired=tmp.value.type; bytesRequired+=2+settingNameLen; bytesRequired+=ofsBlobPtr+1-(ofsSettingsGroup+offsetof(struct DBContactSettings,blob)); - if((DWORD)bytesRequired>dbcs.cbBlob) { + if ((DWORD)bytesRequired>dbcs.cbBlob) { //doesn't fit: move entire group struct DBContactSettings *dbcsPrev; DWORD ofsDbcsPrev,oldSize,ofsNew; @@ -843,7 +843,7 @@ static INT_PTR DeleteContactSetting(WPARAM wParam,LPARAM lParam) MoveAlong(1+GetSettingValueLength(pBlob)); NeedBytes(1); } - if(!pBlob[0]) { //setting didn't exist + if (!pBlob[0]) { //setting didn't exist LeaveCriticalSection(&csDbAccess); return 1; } @@ -906,7 +906,7 @@ static INT_PTR EnumContactSettings(WPARAM wParam,LPARAM lParam) return -1; } dbces->ofsSettings=GetSettingsGroupOfsByModuleNameOfs(&dbc,ofsContact,ofsModuleName); - if(!dbces->ofsSettings) { + if (!dbces->ofsSettings) { LeaveCriticalSection(&csDbAccess); return -1; } -- cgit v1.2.3