]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(q_table): Use a const pointer array.
authorNiels Möller <nisse@lysator.liu.se>
Tue, 5 Oct 2004 21:46:33 +0000 (23:46 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Tue, 5 Oct 2004 21:46:33 +0000 (23:46 +0200)
Rev: src/nettle/twofish.c:1.7

twofish.c

index 9ebcf1b0e1d8a2399ccc71a0ca0207dbce755362..c7d05a13e079c7021e2e2a2f4b62baa01f377969 100644 (file)
--- a/twofish.c
+++ b/twofish.c
@@ -199,10 +199,11 @@ compute_s(uint32_t m1, uint32_t m2)
  * of the function h, cf. figure 2 of the twofish paper.
  */
 
-static const uint8_t * q_table[4][5] = { { q1, q1, q0, q0, q1 },
-                                { q0, q1, q1, q0, q0 },
-                                { q0, q0, q0, q1, q1 },
-                                { q1, q0, q1, q1, q0 } };
+static const uint8_t * const q_table[4][5] =
+  { { q1, q1, q0, q0, q1 },
+    { q0, q1, q1, q0, q0 },
+    { q0, q0, q0, q1, q1 },
+    { q1, q0, q1, q1, q0 } };
 
 /* The matrix MDS as specified in section 4.3.2 of the twofish paper. */