]> granicus.if.org Git - php/commitdiff
refactor away un-necessary casts in hashing routines
authorAnthony Ferrara <ircmaxell@gmail.com>
Tue, 12 Jun 2012 18:09:16 +0000 (14:09 -0400)
committerAnthony Ferrara <ircmaxell@gmail.com>
Tue, 12 Jun 2012 18:09:16 +0000 (14:09 -0400)
ext/hash/hash.c

index 7f0d36f6adaec54a43ac022cf89f9fe873c139be..71f3753dab5b99e6d2130e2a5b0f78703e3dfdbf 100644 (file)
@@ -222,8 +222,8 @@ static inline void php_hash_hmac_prep_key(unsigned char *K, const php_hash_ops *
        if (key_len > ops->block_size) {
                /* Reduce the key first */
                ops->hash_init(context);
-               ops->hash_update(context, (unsigned char *) key, key_len);
-               ops->hash_final((unsigned char *) K, context);
+               ops->hash_update(context, key, key_len);
+               ops->hash_final(K, context);
        } else {
                memcpy(K, key, key_len);
        }