From 3ad5334f17119c9ae010d5059f5cfb1831c9ddbd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 17 Mar 2018 22:11:51 +0300 Subject: more warning fixes --- plugins/SimpleStatusMsg/src/main.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'plugins/SimpleStatusMsg') diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index c373c84401..0a9807348d 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -1614,16 +1614,15 @@ static int OnICQStatusMsgRequest(WPARAM wParam, LPARAM lParam, LPARAM lMirParam) return 0; char *szProto = (char *)lMirParam; - BOOL bContactFound = FALSE; - MCONTACT hContact; + MCONTACT hContact = 0; - for (auto &hContact : Contacts()) { - if (db_get_dw(hContact, szProto, "UIN", 0) == (DWORD)lParam) { - bContactFound = TRUE; + for (auto &cc : Contacts()) { + if (db_get_dw(cc, szProto, "UIN", 0) == (DWORD)lParam) { + hContact = cc; break; } } - if (!bContactFound) + if (!hContact) return 0; int iStatus = ICQMsgTypeToStatus(wParam); -- cgit v1.2.3