Skip to content
Snippets Groups Projects
Commit 08fd7f85 authored by Matthias Kolja Miehl's avatar Matthias Kolja Miehl
Browse files

sys/ecc/hamming256: fix variableScope

parent 39ecc12d
No related branches found
No related tags found
No related merge requests found
...@@ -273,9 +273,8 @@ void hamming_compute256x( const uint8_t *pucData, uint32_t dwSize, uint8_t *puCo ...@@ -273,9 +273,8 @@ void hamming_compute256x( const uint8_t *pucData, uint32_t dwSize, uint8_t *puCo
{ {
DEBUG("hamming_compute256x()\n\r"); DEBUG("hamming_compute256x()\n\r");
uint8_t padding;
while (dwSize > 0) { while (dwSize > 0) {
padding = 0; uint8_t padding = 0;
if (dwSize < 256) { if (dwSize < 256) {
padding = 256 - dwSize; padding = 256 - dwSize;
} }
...@@ -290,14 +289,12 @@ void hamming_compute256x( const uint8_t *pucData, uint32_t dwSize, uint8_t *puCo ...@@ -290,14 +289,12 @@ void hamming_compute256x( const uint8_t *pucData, uint32_t dwSize, uint8_t *puCo
uint8_t hamming_verify256x( uint8_t *pucData, uint32_t dwSize, const uint8_t *pucCode ) uint8_t hamming_verify256x( uint8_t *pucData, uint32_t dwSize, const uint8_t *pucCode )
{ {
uint8_t error;
uint8_t result = 0; uint8_t result = 0;
DEBUG( "hamming_verify256x()\n\r" ); DEBUG( "hamming_verify256x()\n\r" );
uint8_t padding;
while (dwSize > 0) { while (dwSize > 0) {
padding = 0; uint8_t error, padding = 0;
if (dwSize < 256) { if (dwSize < 256) {
padding = 256 - dwSize; padding = 256 - dwSize;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment