diff options
Diffstat (limited to 'ext/standard')
-rw-r--r-- | ext/standard/crypt_freesec.c | 8 | ||||
-rw-r--r-- | ext/standard/image.c | 8 | ||||
-rw-r--r-- | ext/standard/string.c | 9 |
3 files changed, 7 insertions, 18 deletions
diff --git a/ext/standard/crypt_freesec.c b/ext/standard/crypt_freesec.c index b7de5a4c02..0a54e3e836 100644 --- a/ext/standard/crypt_freesec.c +++ b/ext/standard/crypt_freesec.c @@ -218,7 +218,6 @@ _crypt_extended_init(void) uint32_t *p, *il, *ir, *fl, *fr; uint32_t *bits28, *bits24; u_char inv_key_perm[64]; - u_char u_key_perm[56]; u_char inv_comp_perm[56]; u_char init_perm[64], final_perm[64]; u_char u_sbox[8][64]; @@ -260,7 +259,6 @@ _crypt_extended_init(void) * compression permutation. */ for (i = 0; i < 56; i++) { - u_key_perm[i] = key_perm[i] - 1; inv_key_perm[key_perm[i] - 1] = i; inv_comp_perm[i] = 255; } @@ -633,7 +631,7 @@ _crypt_extended_r(const char *key, const char *setting, if (*key) key++; } - if (des_setkey((u_char *) keybuf, data)) + if (des_setkey((char *) keybuf, data)) return(NULL); if (*setting == _PASSWORD_EFMT1) { @@ -662,7 +660,7 @@ _crypt_extended_r(const char *key, const char *setting, /* * Encrypt the key with itself. */ - if (des_cipher((u_char *) keybuf, (u_char *) keybuf, + if (des_cipher((char *) keybuf, (char *) keybuf, 0, 1, data)) return(NULL); /* @@ -672,7 +670,7 @@ _crypt_extended_r(const char *key, const char *setting, while (q - (u_char *) keybuf < sizeof(keybuf) && *key) *q++ ^= *key++ << 1; - if (des_setkey((u_char *) keybuf, data)) + if (des_setkey((char *) keybuf, data)) return(NULL); } memcpy(data->output, setting, 9); diff --git a/ext/standard/image.c b/ext/standard/image.c index 0ea3abace2..edb0d50ea3 100644 --- a/ext/standard/image.c +++ b/ext/standard/image.c @@ -204,7 +204,7 @@ static struct gfxinfo *php_handle_swc(php_stream * stream) unsigned long len=64, szlength; int factor = 1,maxfactor = 16; int status = 0; - char *b, *buf = NULL; + unsigned char *b, *buf = NULL; zend_string *bufz; b = ecalloc(1, len + 1); @@ -212,7 +212,7 @@ static struct gfxinfo *php_handle_swc(php_stream * stream) if (php_stream_seek(stream, 5, SEEK_CUR)) return NULL; - if (php_stream_read(stream, a, sizeof(a)) != sizeof(a)) + if (php_stream_read(stream, (char *) a, sizeof(a)) != sizeof(a)) return NULL; if (uncompress(b, &len, a, sizeof(a)) != Z_OK) { @@ -232,8 +232,8 @@ static struct gfxinfo *php_handle_swc(php_stream * stream) do { szlength = ZSTR_LEN(bufz) * (1<<factor++); - buf = (char *) erealloc(buf, szlength); - status = uncompress(buf, &szlength, ZSTR_VAL(bufz), ZSTR_LEN(bufz)); + buf = erealloc(buf, szlength); + status = uncompress(buf, &szlength, (unsigned char *) ZSTR_VAL(bufz), ZSTR_LEN(bufz)); } while ((status==Z_BUF_ERROR)&&(factor<maxfactor)); if (bufz) { diff --git a/ext/standard/string.c b/ext/standard/string.c index 4d5c72404f..bb482ba7a1 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -2966,15 +2966,6 @@ static zend_string *php_strtr_ex(zend_string *str, char *str_from, char *str_to, } /* }}} */ -static int php_strtr_key_compare(const void *a, const void *b) /* {{{ */ -{ - Bucket *f = (Bucket *) a; - Bucket *s = (Bucket *) b; - - return f->h > s->h ? -1 : 1; -} -/* }}} */ - /* {{{ php_strtr_array */ static void php_strtr_array(zval *return_value, zend_string *input, HashTable *pats) { |