httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodent of Unusual Size <Ken.C...@Golux.Com>
Subject Re: [PATCH] ap_md5: unsigned char -> char !?
Date Tue, 27 Oct 1998 12:02:41 GMT
Ralf S. Engelschall wrote:
> Usually we could cast the argument to strlen() to this type, but IMHO it's more
> correct to change the string argument type of the ap_md5() function to "const
> char *" and instead do the cast to "const unsigned char *" for the string
> variable when passing to ap_md5_binary().

Actually, I disagree.  I think it is more appropriate to cast the
argument to strlen() than to change the datatype declaration of
the argument to the outer function.  The latter is concealing
what's actually needed for the sake of appeasing a lib routine
that doesn't care about the content of each byte (as long as it isn't
'\0') anyway.

#ken	P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Group member         <>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>

View raw message