summaryrefslogtreecommitdiff
path: root/plugins/RemovePersonalSettings/src/rps.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/RemovePersonalSettings/src/rps.cpp')
-rw-r--r--plugins/RemovePersonalSettings/src/rps.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp
index d3b6176531..ac901b462b 100644
--- a/plugins/RemovePersonalSettings/src/rps.cpp
+++ b/plugins/RemovePersonalSettings/src/rps.cpp
@@ -222,13 +222,10 @@ void SetProtocolsOffline()
void RemoveUsers()
{
if ( GetSettingBool("GlobalSettings", "RemoveAllUsers", TRUE) ) {
- MCONTACT hContact, hContactOld;
- HANDLE hDbEvent;
-
// To be faster, remove first all metacontacts (because it syncs histories)
- hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
while(hContact != NULL) {
- hContactOld = hContact;
+ MCONTACT hContactOld = hContact;
hContact = db_find_next(hContact);
if (isMetaContact(hContactOld) )
@@ -244,11 +241,10 @@ void RemoveUsers()
}
// Delete events for contacts not in list
- hDbEvent = db_event_first(0);
+ MEVENT hDbEvent = db_event_first(0);
while(hDbEvent != NULL) {
int ret = db_event_delete(0, hDbEvent);
-
hDbEvent = db_event_first(0);
}