diff options
author | Anatol Belski <ab@php.net> | 2015-09-25 09:35:59 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2015-09-25 11:50:13 +0200 |
commit | c75346624a5a12ea1d5da8be65055afbda507687 (patch) | |
tree | a12b075aaef0692ca87e83e10ddd2b817680a58f | |
parent | a05fc48055dee5562b97f8ea8c598186852f2cea (diff) | |
download | php-git-c75346624a5a12ea1d5da8be65055afbda507687.tar.gz |
fix data type and warning
-rw-r--r-- | ext/standard/php_crypt_r.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c index bb88e08027..cce4737982 100644 --- a/ext/standard/php_crypt_r.c +++ b/ext/standard/php_crypt_r.c @@ -127,7 +127,7 @@ to64(char *s, int32_t v, int n) char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { HCRYPTPROV hCryptProv; HCRYPTHASH ctx, ctx1; - unsigned int i, pwl, sl; + DWORD i, pwl, sl; const BYTE magic_md5[4] = "$1$"; const DWORD magic_md5_len = 3; DWORD dwHashLen; @@ -144,7 +144,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { return NULL; } - pwl = (unsigned int) strlen(pw); + pwl = (DWORD) strlen(pw); /* Refine the salt first */ sp = salt; @@ -160,7 +160,7 @@ char * php_md5_crypt_r(const char *pw, const char *salt, char *out) { } /* get the length of the true salt */ - sl = ep - sp; + sl = (DWORD)(ep - sp); /* Create an empty hash object. */ if(!CryptCreateHash(hCryptProv, CALG_MD5, 0, 0, &ctx)) { |