summaryrefslogtreecommitdiff
path: root/ext/standard/mail.c
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-08-27 23:14:54 +0200
committerAnatol Belski <ab@php.net>2014-08-27 23:14:54 +0200
commite6dcd19aed8c45ca38c90c5f019043f422064ac0 (patch)
tree6a6991a9ad61b0cc4832c6e4f37288b98ece142e /ext/standard/mail.c
parent0e41927ca091fa0e421c5fa8734f219343c2ae34 (diff)
downloadphp-git-e6dcd19aed8c45ca38c90c5f019043f422064ac0.tar.gz
restore the old part of ezmlm_hash()
Diffstat (limited to 'ext/standard/mail.c')
-rw-r--r--ext/standard/mail.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/standard/mail.c b/ext/standard/mail.c
index 4efbb77877..3404ebe2ac 100644
--- a/ext/standard/mail.c
+++ b/ext/standard/mail.c
@@ -79,7 +79,7 @@ extern zend_long php_getuid(TSRMLS_D);
PHP_FUNCTION(ezmlm_hash)
{
char *str = NULL;
- zend_ulong h = Z_UL(5381);
+ unsigned int h = 5381;
size_t j, str_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &str, &str_len) == FAILURE) {
@@ -87,10 +87,10 @@ PHP_FUNCTION(ezmlm_hash)
}
for (j = 0; j < str_len; j++) {
- h = (h + (h << Z_UL(5))) ^ (zend_ulong) (unsigned char) tolower(str[j]);
+ h = (h + (h << 5)) ^ (zend_ulong) (unsigned char) tolower(str[j]);
}
- h = (h % Z_UL(53));
+ h = (h % 53);
RETURN_LONG((zend_long) h);
}