Richard Levitte - VMS Whacker wrote:
>
> ben> The weird thing, though, is that the error is wrong. c2l does _not_
> ben> modify its first argument, only the second.
>
> Could be a good thing to check the facts. From des_locl.h:
I did. What I meant is that it doesn't modify what it points to.
> [...]
> #define c2l(c,l) (l =((DES_LONG)(*((c)++))) , \
> l|=((DES_LONG)(*((c)++)))<< 8L, \
> l|=((DES_LONG)(*((c)++)))<<16L, \
> l|=((DES_LONG)(*((c)++)))<<24L)
> [...]
>
> The first argument is definitely being changed. What is weird,
> though, is that des_cblock is basically an array of char, thus making
> in a char pointer, but I assume this is a declaration technicality in
> ANSI C. As it is declared right now ("const des_cblock in"), it
> probably means that in itself is a constant, possibly as well as the
> contents of the array. Unfortunately, I do not have the ANSI C spec.
> handy, so I can't verify this...
That's what I am now wondering - if you do typographic subsitution, then
c is declared "const char c[8]". Which, in the context, is "const char
*c". But it seems the compiler is taking it as "char * const c". Which
is right?
Cheers,
Ben.
--
http://www.apache-ssl.org/ben.html
"My grandfather once told me that there are two kinds of people: those
who work and those who take the credit. He told me to try to be in the
first group; there was less competition there."
- Indira Gandhi
______________________________________________________________________
OpenSSL Project http://www.openssl.org
Development Mailing List [EMAIL PROTECTED]
Automated List Manager [EMAIL PROTECTED]