summaryrefslogtreecommitdiffstats
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
parent7d01dd87e833bc5372aaae6c0eb8bc982ac6a419 (diff)
downloadbcm5719-ortega-f49384858cb9919ef4e2ba1b1988d17bb2a2eb0f.tar.gz
bcm5719-ortega-f49384858cb9919ef4e2ba1b1988d17bb2a2eb0f.zip
build: Update files with codacy recommendations. (#228)
-rw-r--r--.jenkins.groovy2
-rw-r--r--libs/NVRam/crc.c3
-rw-r--r--utils/bin2c/main.cpp2
3 files changed, 3 insertions, 4 deletions
diff --git a/.jenkins.groovy b/.jenkins.groovy
index 8545e52..c662870 100644
--- a/.jenkins.groovy
+++ b/.jenkins.groovy
@@ -189,7 +189,7 @@ finally
cleanWs()
def currentResult = currentBuild.result ?: 'SUCCESS'
- if(currentResult == 'SUCCESS')
+ if (currentResult == 'SUCCESS')
{
notify('SUCCESS', 'Build Passed ')
}
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);
diff --git a/utils/bin2c/main.cpp b/utils/bin2c/main.cpp
index 0132139..24edb67 100644
--- a/utils/bin2c/main.cpp
+++ b/utils/bin2c/main.cpp
@@ -66,7 +66,7 @@ string &escape(std::string &str)
while (str.find("—") != std::string::npos)
{
- str.replace(str.find("—"), strlen("—"), "_"); // Replace @'s with _AT_'s.
+ str.replace(str.find("—"), strlen("—"), "_"); // Replace —'s with _'s.
}
while (str.find("@") != std::string::npos)
OpenPOWER on IntegriCloud