summaryrefslogtreecommitdiff
path: root/plugins/ContactsPlus/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/ContactsPlus/src/main.cpp')
-rw-r--r--plugins/ContactsPlus/src/main.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index 2406d660e6..5ec4620b46 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -94,8 +94,7 @@ static int HookDBEventAdded(WPARAM wParam, LPARAM lParam)
static void ProcessUnreadEvents(void)
{
- HANDLE hContact = db_find_first();
- while (hContact) {
+ for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hDbEvent = db_event_firstUnread(hContact);
while (hDbEvent) {
DBEVENTINFO dbei = { sizeof(dbei) };
@@ -106,7 +105,6 @@ static void ProcessUnreadEvents(void)
}
hDbEvent = db_event_next(hDbEvent);
}
- hContact = db_find_next(hContact);
}
}