summaryrefslogtreecommitdiff
path: root/src/modules/netlib/netlibsecurity.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-11-30 22:12:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-11-30 22:12:34 +0000
commit6be364a555dce699d093f9d49cd14a9b0c174893 (patch)
treeac10770856206fb50d2e83acde528413f5f22009 /src/modules/netlib/netlibsecurity.cpp
parentd9c98bcdfca6da51a1a82dc6c0dc5996b3b6cd6d (diff)
warning fixes
git-svn-id: http://svn.miranda-ng.org/main/trunk@11181 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/netlib/netlibsecurity.cpp')
-rw-r--r--src/modules/netlib/netlibsecurity.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/modules/netlib/netlibsecurity.cpp b/src/modules/netlib/netlibsecurity.cpp
index 46fb1d0e06..395d7f8dd1 100644
--- a/src/modules/netlib/netlibsecurity.cpp
+++ b/src/modules/netlib/netlibsecurity.cpp
@@ -330,28 +330,26 @@ char* NtlmCreateResponseFromChallenge(HANDLE hSecurity, const char *szChallenge,
const TCHAR* loginName = login;
const TCHAR* domainName = _tcschr(login, '\\');
- int domainLen = 0;
- int loginLen = mir_tstrlen(loginName);
- if (domainName != NULL)
- {
+ size_t domainLen = 0;
+ size_t loginLen = mir_tstrlen(loginName);
+ if (domainName != NULL) {
loginName = domainName + 1;
loginLen = mir_tstrlen(loginName);
domainLen = domainName - login;
domainName = login;
}
- else if ((domainName = _tcschr(login, '@')) != NULL)
- {
+ else if ((domainName = _tcschr(login, '@')) != NULL) {
loginName = login;
loginLen = domainName - login;
domainLen = mir_tstrlen(++domainName);
}
auth.User = (PWORD)loginName;
- auth.UserLength = loginLen;
+ auth.UserLength = (ULONG)loginLen;
auth.Password = (PWORD)psw;
- auth.PasswordLength = mir_tstrlen(psw);
+ auth.PasswordLength = (ULONG)mir_tstrlen(psw);
auth.Domain = (PWORD)domainName;
- auth.DomainLength = domainLen;
+ auth.DomainLength = (ULONG)domainLen;
auth.Flags = SEC_WINNT_AUTH_IDENTITY_UNICODE;
hNtlm->hasDomain = domainLen != 0;