mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-20 17:52:35 +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.
|
// Generic implementation of AES-CTR encryption.
|
||||||
void CryptoEngine::encryptAESCtr(CryptoKey _key, uint8_t *_nonce, size_t numBytes, uint8_t *bytes)
|
void CryptoEngine::encryptAESCtr(CryptoKey _key, uint8_t *_nonce, size_t numBytes, uint8_t *bytes)
|
||||||
{
|
{
|
||||||
if (ctr) {
|
delete ctr;
|
||||||
delete ctr;
|
ctr = nullptr;
|
||||||
ctr = nullptr;
|
|
||||||
}
|
|
||||||
if (_key.length == 16)
|
if (_key.length == 16)
|
||||||
ctr = new CTR<AES128>();
|
ctr = new CTR<AES128>();
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user