mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-28 21:50:35 +00:00
fix a lot of nuisances reported by cppcheck (#4872)
* fix a lot of nuisances reported by cppcheck * fix portduino
This commit is contained in:
@@ -167,12 +167,12 @@ bool CryptoEngine::setDHKey(uint32_t nodeNum)
|
||||
void CryptoEngine::hash(uint8_t *bytes, size_t numBytes)
|
||||
{
|
||||
SHA256 hash;
|
||||
size_t posn, len;
|
||||
size_t posn;
|
||||
uint8_t size = numBytes;
|
||||
uint8_t inc = 16;
|
||||
hash.reset();
|
||||
for (posn = 0; posn < size; posn += inc) {
|
||||
len = size - posn;
|
||||
size_t len = size - posn;
|
||||
if (len > inc)
|
||||
len = inc;
|
||||
hash.update(bytes + posn, len);
|
||||
|
||||
Reference in New Issue
Block a user