]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
(find_first_one): Declare the lookup table as static const, and
authorNiels Möller <nisse@lysator.liu.se>
Wed, 8 Jun 2011 09:17:18 +0000 (11:17 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 8 Jun 2011 09:17:18 +0000 (11:17 +0200)
use unsigned char rather than unsigned..

Rev: nettle/examples/eratosthenes.c:1.12

examples/eratosthenes.c

index 25759bba03ef5b5a9a44b11f54eee74d5594586d..932eebedc3d2e68adcb23cff2ba3db46c3f904b6 100644 (file)
@@ -124,7 +124,7 @@ vector_clear_bits (unsigned long *vector, unsigned long step,
 static unsigned
 find_first_one (unsigned long x)
 {  
-  unsigned table[0x101] =
+  static const unsigned char table[0x101] =
     {
      15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,