Get rid of "unary minus applied to unsigned type" warning.
This commit is contained in:
parent
dabaea8048
commit
b914049c53
1 changed files with 2 additions and 2 deletions
|
@ -157,7 +157,7 @@ void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata,
|
||||||
if (!is_endian.little)
|
if (!is_endian.little)
|
||||||
{ /* BIG-ENDIAN CASE */
|
{ /* BIG-ENDIAN CASE */
|
||||||
# define BESHFT(c) (((sizeof(RC4_CHUNK)-(c)-1)*8)&(sizeof(RC4_CHUNK)*8-1))
|
# 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&~(sizeof(RC4_CHUNK)-1);len-=sizeof(RC4_CHUNK))
|
||||||
{
|
{
|
||||||
ichunk = *(RC4_CHUNK *)indata;
|
ichunk = *(RC4_CHUNK *)indata;
|
||||||
otp = RC4_STEP<<BESHFT(0);
|
otp = RC4_STEP<<BESHFT(0);
|
||||||
|
@ -210,7 +210,7 @@ void RC4(RC4_KEY *key, unsigned long len, const unsigned char *indata,
|
||||||
else
|
else
|
||||||
{ /* LITTLE-ENDIAN CASE */
|
{ /* LITTLE-ENDIAN CASE */
|
||||||
# define LESHFT(c) (((c)*8)&(sizeof(RC4_CHUNK)*8-1))
|
# define LESHFT(c) (((c)*8)&(sizeof(RC4_CHUNK)*8-1))
|
||||||
for (;len&-sizeof(RC4_CHUNK);len-=sizeof(RC4_CHUNK))
|
for (;len&~(sizeof(RC4_CHUNK)-1);len-=sizeof(RC4_CHUNK))
|
||||||
{
|
{
|
||||||
ichunk = *(RC4_CHUNK *)indata;
|
ichunk = *(RC4_CHUNK *)indata;
|
||||||
otp = RC4_STEP;
|
otp = RC4_STEP;
|
||||||
|
|
Loading…
Reference in a new issue