Move some tables to "const" and remove some unused vars.

This commit is contained in:
Poul-Henning Kamp 1996-01-07 22:32:35 +00:00
parent 3b3f55c76f
commit 8b0458040d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=13322

View File

@ -41,7 +41,7 @@ struct inv_mat {
/*
* Powers of x, modulo 255.
*/
static UCHAR alpha_power[] = {
static const UCHAR alpha_power[] = {
0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80,
0x87, 0x89, 0x95, 0xad, 0xdd, 0x3d, 0x7a, 0xf4,
0x6f, 0xde, 0x3b, 0x76, 0xec, 0x5f, 0xbe, 0xfb,
@ -80,7 +80,7 @@ static UCHAR alpha_power[] = {
/*
* Log table, modulo 255 + 1.
*/
static UCHAR alpha_log[] = {
static const UCHAR alpha_log[] = {
0xff, 0x00, 0x01, 0x63, 0x02, 0xc6, 0x64, 0x6a,
0x03, 0xcd, 0xc7, 0xbc, 0x65, 0x7e, 0x6b, 0x2a,
0x04, 0x8d, 0xce, 0x4e, 0xc8, 0xd4, 0xbd, 0xe1,
@ -119,7 +119,7 @@ static UCHAR alpha_log[] = {
/*
* Multiplication table for 0xc0.
*/
static UCHAR mult_c0[] = {
static const UCHAR mult_c0[] = {
0x00, 0xc0, 0x07, 0xc7, 0x0e, 0xce, 0x09, 0xc9,
0x1c, 0xdc, 0x1b, 0xdb, 0x12, 0xd2, 0x15, 0xd5,
0x38, 0xf8, 0x3f, 0xff, 0x36, 0xf6, 0x31, 0xf1,
@ -322,7 +322,6 @@ calculate_inverse(int nerrs, int *pblk, struct inv_mat *inv)
static inline void
determine(int nerrs, struct inv_mat *inv, UCHAR *ss, UCHAR *es)
{
UCHAR tmp;
int i, j;
for (i = 0; i < nerrs; i++) {
@ -404,10 +403,10 @@ int
check_parity(UCHAR *data, ULONG badmap, ULONG crcmap)
{
int crcerrs, eblk[3];
int col, row;
int i, j, nblks;
int col;
int i, nblks;
UCHAR ss[3], es[3];
int i1, i2, saverrs;
int i1, i2;
struct inv_mat inv;
nblks = sect_count(badmap);