From c730f12da81f636ecf65aa656a46b9337daaa37a Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 14 Dec 2014 21:30:16 +0000 Subject: Clist_modern: changed warning lavel to w4 git-svn-id: http://svn.miranda-ng.org/main/trunk@11425 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_awaymsg.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'plugins/Clist_modern/src/modern_awaymsg.cpp') diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp index 75cc325e06..adba1130a3 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.cpp +++ b/plugins/Clist_modern/src/modern_awaymsg.cpp @@ -85,18 +85,18 @@ static void amThreadProc(void *) MCONTACT hContact = amGetCurrentChain(); while (hContact) { DWORD time = GetTickCount(); - if ((time-amRequestTick) < AMASKPERIOD) { - SleepEx(AMASKPERIOD-(time-amRequestTick)+10, TRUE); - if ( MirandaExiting()) + if ((time - amRequestTick) < AMASKPERIOD) { + SleepEx(AMASKPERIOD - (time - amRequestTick) + 10, TRUE); + if (MirandaExiting()) return; } CListSettings_FreeCacheItemData(&dnce); dnce.hContact = hContact; - Sync(CLUI_SyncGetPDNCE, (WPARAM) 0, (LPARAM)&dnce); + Sync(CLUI_SyncGetPDNCE, (WPARAM)0, (LPARAM)&dnce); HANDLE ACK = 0; if (dnce.ApparentMode != ID_STATUS_OFFLINE) //don't ask if contact is always invisible (should be done with protocol) - ACK = (HANDLE)CallContactService(hContact,PSS_GETAWAYMSG, 0, 0); + ACK = (HANDLE)CallContactService(hContact, PSS_GETAWAYMSG, 0, 0); if (!ACK) { ACKDATA ack; ack.hContact = hContact; @@ -112,20 +112,19 @@ static void amThreadProc(void *) amRequestTick = time; hContact = amGetCurrentChain(); if (hContact) { - DWORD i=0; + DWORD i = 0; do { i++; SleepEx(50, TRUE); - } - while (i < AMASKPERIOD/50 && !MirandaExiting()); + } while (i < AMASKPERIOD / 50 && !MirandaExiting()); } else break; - if ( MirandaExiting()) + if (MirandaExiting()) return; } WaitForSingleObjectEx(hamProcessEvent, INFINITE, TRUE); ResetEvent(hamProcessEvent); - if ( MirandaExiting()) + if (MirandaExiting()) break; } } @@ -157,7 +156,7 @@ void amRequestAwayMsg(MCONTACT hContact) void InitAwayMsgModule() { InitializeCriticalSection(&amCS); - hamProcessEvent = CreateEvent(NULL,FALSE,FALSE,NULL); + hamProcessEvent = CreateEvent(NULL, FALSE, FALSE, NULL); g_hAwayMsgThread = mir_forkthread(amThreadProc, 0); } -- cgit v1.2.3