diff options
author | Niels Möller <nisse@lysator.liu.se> | 2011-11-24 15:01:25 +0100 |
---|---|---|
committer | Niels Möller <nisse@lysator.liu.se> | 2011-11-24 15:01:25 +0100 |
commit | 40d9583ff48bcdd4c3484eabf64b7d93ff1e59e0 (patch) | |
tree | 54220f1286c1b1ff0760a44b5a6e0e0fea50259f /serpent-internal.h | |
parent | b664e47dad8be436b9c39af3a2355b3ccdb292ab (diff) | |
download | nettle-40d9583ff48bcdd4c3484eabf64b7d93ff1e59e0.tar.gz |
(ROL64): Use (uint64_t) 1 rather than 1L, for
systems. Needed for M$ w64.
(RSHIFT64): Likewise. Also added a missing parenthesis.
Rev: nettle/ChangeLog:1.236
Rev: nettle/serpent-internal.h:1.2
Diffstat (limited to 'serpent-internal.h')
-rw-r--r-- | serpent-internal.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/serpent-internal.h b/serpent-internal.h index 66d5af49..dffd9296 100644 --- a/serpent-internal.h +++ b/serpent-internal.h @@ -55,8 +55,8 @@ #if HAVE_NATIVE_64_BIT /* Operate independently on both halves of a 64-bit word. */ #define ROL64(x,n) \ - (((x) << (n) & ~(((1L << (n))-1) << 32)) \ - |(((x) >> (32-(n))) & ~(((1L << (32-(n)))-1) << (n)))) + (((x) << (n) & ~((((uint64_t) 1 << (n))-1) << 32)) \ + |(((x) >> (32-(n))) & ~((((uint64_t) 1 << (32-(n)))-1) << (n)))) #define KEYXOR64(x0,x1,x2,x3, subkey) \ do { \ @@ -68,7 +68,7 @@ } while (0) #define RSHIFT64(x,n) \ - ( ((x) << (n)) & ~(((1L << n) - 1) << 32)) + ( ((x) << (n)) & ~((((uint64_t) 1 << (n)) - 1) << 32)) #endif /* HAVE_NATIVE_64_BIT */ #endif /* NETTLE_SERPENT_INTERNAL_H_INCLUDED */ |