aboutsummaryrefslogtreecommitdiff
path: root/d3des.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-06 16:31:30 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-09-06 16:31:30 +0000
commit5bfd5521ff344eedd862abdfda9a68cefad912ba (patch)
tree48d3fd98c245b47ecf5b0951441c259cd159b798 /d3des.c
parent29d26d20e5b4a9f28cdd9d072b407223e7b0e610 (diff)
Some little fixes on QEMU
- some vectors can be declared as "const" - test on CONFIG_VNC_TLS is done for two times while just one is enough. (Carlo Bramini) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5172 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'd3des.c')
-rw-r--r--d3des.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/d3des.c b/d3des.c
index eaca581653..6e8a02eb59 100644
--- a/d3des.c
+++ b/d3des.c
@@ -35,10 +35,10 @@ static void cookey(unsigned long *);
static unsigned long KnL[32] = { 0L };
-static unsigned short bytebit[8] = {
+static const unsigned short bytebit[8] = {
01, 02, 04, 010, 020, 040, 0100, 0200 };
-static unsigned long bigbyte[24] = {
+static const unsigned long bigbyte[24] = {
0x800000L, 0x400000L, 0x200000L, 0x100000L,
0x80000L, 0x40000L, 0x20000L, 0x10000L,
0x8000L, 0x4000L, 0x2000L, 0x1000L,
@@ -48,16 +48,16 @@ static unsigned long bigbyte[24] = {
/* Use the key schedule specified in the Standard (ANSI X3.92-1981). */
-static unsigned char pc1[56] = {
+static const unsigned char pc1[56] = {
56, 48, 40, 32, 24, 16, 8, 0, 57, 49, 41, 33, 25, 17,
9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35,
62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21,
13, 5, 60, 52, 44, 36, 28, 20, 12, 4, 27, 19, 11, 3 };
-static unsigned char totrot[16] = {
+static const unsigned char totrot[16] = {
1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28 };
-static unsigned char pc2[48] = {
+static const unsigned char pc2[48] = {
13, 16, 10, 23, 0, 4, 2, 27, 14, 5, 20, 9,
22, 18, 11, 3, 25, 7, 15, 6, 26, 19, 12, 1,
40, 51, 30, 36, 46, 54, 29, 39, 50, 44, 32, 47,