summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorEvan Lojewski <github@meklort.com>2021-06-19 09:48:50 -0600
committerGitHub <noreply@github.com>2021-06-19 09:48:50 -0600
commitf49384858cb9919ef4e2ba1b1988d17bb2a2eb0f (patch)
treed045320732f30beed139841a383b3908ba5dd494 /libs
parent7d01dd87e833bc5372aaae6c0eb8bc982ac6a419 (diff)
downloadbcm5719-ortega-f49384858cb9919ef4e2ba1b1988d17bb2a2eb0f.tar.gz
bcm5719-ortega-f49384858cb9919ef4e2ba1b1988d17bb2a2eb0f.zip
build: Update files with codacy recommendations. (#228)
Diffstat (limited to 'libs')
-rw-r--r--libs/NVRam/crc.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/libs/NVRam/crc.c b/libs/NVRam/crc.c
index d3dd384..5e64f1a 100644
--- a/libs/NVRam/crc.c
+++ b/libs/NVRam/crc.c
@@ -50,11 +50,10 @@ uint32_t NVRam_crc(const uint8_t *pcDatabuf, // Pointer to data buffer
uint32_t ulDatalen, // Length of data buffer in bytes
uint32_t crc) // Initial value
{
- uint8_t data;
uint32_t idx, bit;
for (idx = 0; idx < ulDatalen; idx++)
{
- data = *pcDatabuf++;
+ uint8_t data = *pcDatabuf++;
for (bit = 0; bit < 8; bit++, data >>= 1)
{
crc = (crc >> 1) ^ (((crc ^ data) & 1) ? CRC32_POLYNOMIAL : 0);
OpenPOWER on IntegriCloud