mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-13 22:32:27 +00:00
Remove unnecessary null pointer check (#6370)
Further pointed out by @elfring, this patch removes one more unnecessary null pointer check. https://github.com/meshtastic/firmware/issues/6170#issuecomment-2744002798
This commit is contained in:
@@ -223,10 +223,8 @@ void CryptoEngine::decrypt(uint32_t fromNode, uint64_t packetId, size_t numBytes
|
||||
// Generic implementation of AES-CTR encryption.
|
||||
void CryptoEngine::encryptAESCtr(CryptoKey _key, uint8_t *_nonce, size_t numBytes, uint8_t *bytes)
|
||||
{
|
||||
if (ctr) {
|
||||
delete ctr;
|
||||
ctr = nullptr;
|
||||
}
|
||||
delete ctr;
|
||||
ctr = nullptr;
|
||||
if (_key.length == 16)
|
||||
ctr = new CTR<AES128>();
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user