summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-09-05 17:40:02 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-09-05 17:40:02 +0000
commit3dc956a73004c98c3c96cb8635c28f7646bdbde8 (patch)
tree72885209670091884428981a30ef818e8ba360fe
parente67ea55183c4ea3cff08dfbcb66d2860470fa225 (diff)
various minor fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@17257 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--plugins/Dbx_mdb/src/dbintf.cpp6
-rw-r--r--src/mir_app/src/netliblog.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/plugins/Dbx_mdb/src/dbintf.cpp b/plugins/Dbx_mdb/src/dbintf.cpp
index 8dbc56fa22..c1f7500ccf 100644
--- a/plugins/Dbx_mdb/src/dbintf.cpp
+++ b/plugins/Dbx_mdb/src/dbintf.cpp
@@ -177,10 +177,10 @@ int CDbxMdb::Check(void)
fseek(pFile, (LONG)iDefHeaderOffset, SEEK_SET);
BYTE buf[_countof(bDefHeader)];
- if (fread(buf, 1, _countof(buf), pFile) != _countof(buf))
- return EGROKPRF_DAMAGED;
-
+ size_t cbRead = fread(buf, 1, _countof(buf), pFile);
fclose(pFile);
+ if (cbRead != _countof(buf))
+ return EGROKPRF_DAMAGED;
return (memcmp(buf, bDefHeader, _countof(bDefHeader))) ? EGROKPRF_UNKHEADER : 0;
}
diff --git a/src/mir_app/src/netliblog.cpp b/src/mir_app/src/netliblog.cpp
index 300caa9684..eb001fb1df 100644
--- a/src/mir_app/src/netliblog.cpp
+++ b/src/mir_app/src/netliblog.cpp
@@ -74,7 +74,7 @@ static void InitLog()
}
else {
db_set_ws(NULL, "Netlib", "File", logOptions.tszUserFile = L"%miranda_logpath%\\netlog.txt");
- logOptions.tszFile = Utils_ReplaceVarsT(logOptions.tszUserFile);
+ logOptions.tszFile = VARSW(logOptions.tszUserFile);
}
if (logOptions.toFile)