diff options
author | Andy Polyakov <appro@openssl.org> | 2008-12-29 13:35:49 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2008-12-29 13:35:49 +0100 |
commit | 5cabcf96e77bcf6d23bfb3ec32c9ea37100578c6 (patch) | |
tree | 2c2e0f123d4bc953e75e9919488c92b78b5c75b4 /crypto/rc4 | |
parent | Die earlier if hash is NULL. (Coverity IDs 137 & 138). (diff) | |
download | openssl-5cabcf96e77bcf6d23bfb3ec32c9ea37100578c6.tar.xz openssl-5cabcf96e77bcf6d23bfb3ec32c9ea37100578c6.zip |
Fix "possible loss of data" Win64 compiler warnings.
Diffstat (limited to 'crypto/rc4')
-rw-r--r-- | crypto/rc4/rc4_enc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/rc4/rc4_enc.c b/crypto/rc4/rc4_enc.c index 37ef43c16c..8c4fc6c7a3 100644 --- a/crypto/rc4/rc4_enc.c +++ b/crypto/rc4/rc4_enc.c @@ -157,7 +157,7 @@ void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, if (!is_endian.little) { /* BIG-ENDIAN CASE */ # define BESHFT(c) (((sizeof(RC4_CHUNK)-(c)-1)*8)&(sizeof(RC4_CHUNK)*8-1)) - for (;len&-sizeof(RC4_CHUNK);len-=sizeof(RC4_CHUNK)) + for (;len&(0-sizeof(RC4_CHUNK));len-=sizeof(RC4_CHUNK)) { ichunk = *(RC4_CHUNK *)indata; otp = RC4_STEP<<BESHFT(0); @@ -210,7 +210,7 @@ void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, else { /* LITTLE-ENDIAN CASE */ # define LESHFT(c) (((c)*8)&(sizeof(RC4_CHUNK)*8-1)) - for (;len&-sizeof(RC4_CHUNK);len-=sizeof(RC4_CHUNK)) + for (;len&(0-sizeof(RC4_CHUNK));len-=sizeof(RC4_CHUNK)) { ichunk = *(RC4_CHUNK *)indata; otp = RC4_STEP; |