X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs2.git;a=blobdiff_plain;f=yaffs_ecc.c;fp=yaffs_ecc.c;h=4030908d518178c01de13b195290a3970337e627;hp=71ebe765c9d29bd40056d28097128045fd3f3503;hb=f43976eda35065890e7cf0a008e9518158eb71d6;hpb=70c6bf2ff57c8a2fb778accdd5b4227abf273674 diff --git a/yaffs_ecc.c b/yaffs_ecc.c index 71ebe76..4030908 100644 --- a/yaffs_ecc.c +++ b/yaffs_ecc.c @@ -245,7 +245,7 @@ int yaffs_ecc_correct(unsigned char *data, unsigned char *read_ecc, /* * ECCxxxOther does ECC calcs on arbitrary n bytes of data */ -void yaffs_ecc_calc_other(const unsigned char *data, unsigned nBytes, +void yaffs_ecc_calc_other(const unsigned char *data, unsigned n_bytes, yaffs_ECCOther *eccOther) { unsigned int i; @@ -255,7 +255,7 @@ void yaffs_ecc_calc_other(const unsigned char *data, unsigned nBytes, unsigned line_parity_prime = 0; unsigned char b; - for (i = 0; i < nBytes; i++) { + for (i = 0; i < n_bytes; i++) { b = column_parity_table[*data++]; col_parity ^= b; @@ -272,7 +272,7 @@ void yaffs_ecc_calc_other(const unsigned char *data, unsigned nBytes, eccOther->lineParityPrime = line_parity_prime; } -int yaffs_ecc_correct_other(unsigned char *data, unsigned nBytes, +int yaffs_ecc_correct_other(unsigned char *data, unsigned n_bytes, yaffs_ECCOther *read_ecc, const yaffs_ECCOther *test_ecc) { @@ -301,7 +301,7 @@ int yaffs_ecc_correct_other(unsigned char *data, unsigned nBytes, if (cDelta & 0x02) bit |= 0x01; - if (lDelta >= nBytes) + if (lDelta >= n_bytes) return -1; data[lDelta] ^= (1 << bit);