summaryrefslogtreecommitdiff
path: root/plugins/Scriver/src/msgs.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Scriver/src/msgs.cpp')
-rw-r--r--plugins/Scriver/src/msgs.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index 6bda0dfb90..0eaf5158c8 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -276,8 +276,7 @@ static void RestoreUnreadMessageAlerts(void)
cle.flags = CLEF_TCHAR;
cle.ptszTooltip = toolTip;
- 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) {
dbei.cbBlob = 0;
@@ -303,7 +302,6 @@ static void RestoreUnreadMessageAlerts(void)
}
hDbEvent = db_event_next(hDbEvent);
}
- hContact = db_find_next(hContact);
}
}