diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-21 13:43:01 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-21 13:43:01 +0000 |
commit | 9cb64ba2151b213f5544b2e53c6668061f197b9c (patch) | |
tree | bf4c796a96df96a9875af9d772826937f66ee33c /plugins/Exchange | |
parent | bc69e94ff28a1f7cd0c0b99fa7d2702b8807539f (diff) |
MS_UTILS_GETRANDOM -> mir_core::Utils_GetRandom
git-svn-id: http://svn.miranda-ng.org/main/trunk@14299 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Exchange')
-rw-r--r-- | plugins/Exchange/src/utils.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/plugins/Exchange/src/utils.cpp b/plugins/Exchange/src/utils.cpp index 2344840601..0919ac6651 100644 --- a/plugins/Exchange/src/utils.cpp +++ b/plugins/Exchange/src/utils.cpp @@ -112,12 +112,11 @@ int GetStringFromDatabase(char *szSettingName, TCHAR *szError, TCHAR *szResult, {
DBVARIANT dbv = {0};
int res = 1;
- int len;
dbv.type = DBVT_ASCIIZ;
if (db_get_ts(NULL, ModuleName, szSettingName, &dbv) == 0) {
res = 0;
size_t tmp = mir_tstrlen(dbv.ptszVal);
- len = (tmp < size - 1) ? tmp : size - 1;
+ size_t len = (tmp < size - 1) ? tmp : size - 1;
_tcsncpy(szResult, dbv.ptszVal, len);
szResult[len] = '\0';
mir_free(dbv.ptszVal);
@@ -125,7 +124,7 @@ int GetStringFromDatabase(char *szSettingName, TCHAR *szError, TCHAR *szResult, else {
res = 1;
size_t tmp = mir_tstrlen(szError);
- len = (tmp < size - 1) ? tmp : size - 1;
+ size_t len = (tmp < size - 1) ? tmp : size - 1;
_tcsncpy(szResult, szError, len);
szResult[len] = '\0';
}
|