summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP/src/renamemodule.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/DbEditorPP/src/renamemodule.cpp')
-rw-r--r--plugins/DbEditorPP/src/renamemodule.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/DbEditorPP/src/renamemodule.cpp b/plugins/DbEditorPP/src/renamemodule.cpp
index 3f87c49644..74e9e00a4a 100644
--- a/plugins/DbEditorPP/src/renamemodule.cpp
+++ b/plugins/DbEditorPP/src/renamemodule.cpp
@@ -1,19 +1,17 @@
#include "stdafx.h"
-
int renameModule(MCONTACT hContact, const char *oldName, const char *newName)
{
- DBVARIANT dbv;
ModuleSettingLL settinglist;
-
if (IsModuleEmpty(hContact, oldName) || !EnumSettings(hContact, oldName, &settinglist))
- return 0;
+ return 0;
int cnt = 0;
- for(ModSetLinkLinkItem *setting = settinglist.first; setting; setting = setting->next) {
+ for (ModSetLinkLinkItem *setting = settinglist.first; setting; setting = setting->next) {
+ DBVARIANT dbv;
if (!db_get_s(hContact, oldName, setting->name, &dbv, 0)) {
- db_set(hContact, newName, setting->name, &dbv);
+ db_set(hContact, newName, setting->name, &dbv);
db_unset(hContact, oldName, setting->name);
db_free(&dbv);
cnt++;
@@ -23,7 +21,7 @@ int renameModule(MCONTACT hContact, const char *oldName, const char *newName)
return cnt;
}
-INT_PTR CALLBACK AddModDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
+static INT_PTR CALLBACK AddModDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
switch (uMsg) {
case WM_INITDIALOG: