httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christophe JAILLET <christophe.jail...@wanadoo.fr>
Subject Re: svn commit: r1422549 - in /httpd/httpd/trunk: include/ap_mmn.h include/httpd.h server/util.c server/util_md5.c
Date Sun, 16 Dec 2012 20:22:49 GMT
Le 16/12/2012 12:49, sf@apache.org a écrit :
> +AP_DECLARE(void) ap_bin2hex(const void *src, apr_size_t srclen, char *dest)
> +{
> +    const unsigned char *in = src;
> +    unsigned char *out = (unsigned char *)dest;
> +    apr_size_t i;
> +
> +    for (i = 0; i < srclen; i++) {
> +        *out++ = c2x_table[in[i] >> 4];
> +        *out++ = c2x_table[in[i] & 0xf];
> +    }
> +    *out = '\0';
> +}
> +
This will be useful for PR 50919.

BTW, why these casts to unsigned char ?
I don't see what it brings here. Moreover c2x_table is just 'static 
const char[]'

CJ


Mime
View raw message