com php-src: fix data type and warning: ext/standard/php_cryp t_r.c
| From: | Anatol Belski | Date: | Fri, 25 Sep 2015 09:50:13 +0000 |
| Subject: | com php-src: fix data type and warning: ext/standard/php_cryp t_r.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-89177@lists.php.net to get a copy of this message | ||
Commit: c75346624a5a12ea1d5da8be65055afbda507687
Author: Anatol Belski <ab@php.net> Fri, 25 Sep 2015 09:35:59 +0200
Parents: a05fc48055dee5562b97f8ea8c598186852f2cea
Branches: PHP-7.0 master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=c75346624a5a12ea1d5da8be65055afbda507687
Log:
fix data type and warning
Changed paths:
M ext/standard/php_crypt_r.c
Diff:
diff --git a/ext/standard/php_crypt_r.c b/ext/standard/php_crypt_r.c
index bb88e08..cce4737 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)) {