From: Niels Möller Date: Wed, 8 Jun 2011 09:17:18 +0000 (+0200) Subject: (find_first_one): Declare the lookup table as static const, and X-Git-Tag: nettle_2.2_release_20110711~76 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=20df2f4b2c0c65a9804b8df03a7ebe747877e2f8;p=thirdparty%2Fnettle.git (find_first_one): Declare the lookup table as static const, and use unsigned char rather than unsigned.. Rev: nettle/examples/eratosthenes.c:1.12 --- diff --git a/examples/eratosthenes.c b/examples/eratosthenes.c index 25759bba..932eebed 100644 --- a/examples/eratosthenes.c +++ b/examples/eratosthenes.c @@ -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,