summaryrefslogtreecommitdiff
path: root/plugins/DbEditorPP
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-07-26 13:43:27 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-07-26 13:43:27 +0000
commit38f9ee31afcb519f7ecba02b56737ae637de5c7a (patch)
tree98a676cd76c8897c1a12ae69a4a3c740ac5cc065 /plugins/DbEditorPP
parentf4af257e9365602dc81a4b324b0ffeed1e0b2eef (diff)
more warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@14728 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/DbEditorPP')
-rw-r--r--plugins/DbEditorPP/src/exportimport.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp
index b474684de4..cfe09ffcb7 100644
--- a/plugins/DbEditorPP/src/exportimport.cpp
+++ b/plugins/DbEditorPP/src/exportimport.cpp
@@ -64,9 +64,7 @@ void exportModule(MCONTACT hContact, const char *module, FILE *file)
setting = settinglist.first;
while (setting) {
DBVARIANT dbv;
-
if (!db_get_s(hContact, module, setting->name, &dbv, 0)) {
-
switch (dbv.type) {
case DBVT_BYTE:
fprintf(file, "\n%s=b%s", setting->name, _ultoa(dbv.bVal, tmp, 10));
@@ -78,15 +76,11 @@ void exportModule(MCONTACT hContact, const char *module, FILE *file)
fprintf(file, "\n%s=d%s", setting->name, _ultoa(dbv.dVal, tmp, 10));
break;
case DBVT_BLOB:
- {
- ptrA data(StringFromBlob(dbv.pbVal, dbv.cpbVal));
- fprintf(file, "\n%s=n%s", setting->name, data);
+ fprintf(file, "\n%s=n%s", setting->name, ptrA(StringFromBlob(dbv.pbVal, dbv.cpbVal)));
break;
- }
case DBVT_WCHAR:
case DBVT_ASCIIZ:
case DBVT_UTF8:
- {
char *str = (dbv.type == DBVT_WCHAR) ? mir_utf8encodeW(dbv.pwszVal) : dbv.pszVal;
if (strchr(str, '\r')) {
@@ -95,15 +89,15 @@ void exportModule(MCONTACT hContact, const char *module, FILE *file)
end.Replace("\r", "\\r");
end.Replace("\n", "\\n");
fprintf(file, "\n%s=g%s", setting->name, end.c_str());
- } else {
+ }
+ else {
fprintf(file, "\n%s=%c", setting->name, (dbv.type == DBVT_ASCIIZ) ? 's' : 'u');
fputs(str, file);
}
- if (str != dbv.pszVal)
+ if (str != dbv.pszVal)
mir_free(str);
break;
}
- } // switch
db_free(&dbv);
}
setting = (ModSetLinkLinkItem *)setting->next;