Commit 5bfd5521ff344eedd862abdfda9a68cefad912ba

Authored by aurel32
1 parent 29d26d20

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
Showing 3 changed files with 6 additions and 8 deletions
... ... @@ -35,10 +35,10 @@ static void cookey(unsigned long *);
35 35  
36 36 static unsigned long KnL[32] = { 0L };
37 37  
38   -static unsigned short bytebit[8] = {
  38 +static const unsigned short bytebit[8] = {
39 39 01, 02, 04, 010, 020, 040, 0100, 0200 };
40 40  
41   -static unsigned long bigbyte[24] = {
  41 +static const unsigned long bigbyte[24] = {
42 42 0x800000L, 0x400000L, 0x200000L, 0x100000L,
43 43 0x80000L, 0x40000L, 0x20000L, 0x10000L,
44 44 0x8000L, 0x4000L, 0x2000L, 0x1000L,
... ... @@ -48,16 +48,16 @@ static unsigned long bigbyte[24] = {
48 48  
49 49 /* Use the key schedule specified in the Standard (ANSI X3.92-1981). */
50 50  
51   -static unsigned char pc1[56] = {
  51 +static const unsigned char pc1[56] = {
52 52 56, 48, 40, 32, 24, 16, 8, 0, 57, 49, 41, 33, 25, 17,
53 53 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35,
54 54 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21,
55 55 13, 5, 60, 52, 44, 36, 28, 20, 12, 4, 27, 19, 11, 3 };
56 56  
57   -static unsigned char totrot[16] = {
  57 +static const unsigned char totrot[16] = {
58 58 1,2,4,6,8,10,12,14,15,17,19,21,23,25,27,28 };
59 59  
60   -static unsigned char pc2[48] = {
  60 +static const unsigned char pc2[48] = {
61 61 13, 16, 10, 23, 0, 4, 2, 27, 14, 5, 20, 9,
62 62 22, 18, 11, 3, 25, 7, 15, 6, 26, 19, 12, 1,
63 63 40, 51, 30, 36, 46, 54, 29, 39, 50, 44, 32, 47,
... ...
vgafont.h
1   -static uint8_t vgafont16[256 * 16] = {
  1 +static const uint8_t vgafont16[256 * 16] = {
2 2  
3 3 /* 0 0x00 '^@' */
4 4 0x00, /* 00000000 */
... ...
... ... @@ -109,12 +109,10 @@ enum {
109 109 VNC_AUTH_VENCRYPT_X509PLAIN = 262,
110 110 };
111 111  
112   -#if CONFIG_VNC_TLS
113 112 #define X509_CA_CERT_FILE "ca-cert.pem"
114 113 #define X509_CA_CRL_FILE "ca-crl.pem"
115 114 #define X509_SERVER_KEY_FILE "server-key.pem"
116 115 #define X509_SERVER_CERT_FILE "server-cert.pem"
117   -#endif
118 116  
119 117 #endif /* CONFIG_VNC_TLS */
120 118  
... ...