diff --git a/lib/subghz/protocols/keeloq_common.c b/lib/subghz/protocols/keeloq_common.c index da8c586c9..479a9ddb5 100644 --- a/lib/subghz/protocols/keeloq_common.c +++ b/lib/subghz/protocols/keeloq_common.c @@ -91,11 +91,10 @@ inline uint64_t inline uint64_t subghz_protocol_keeloq_common_faac_learning(const uint32_t seed, const uint32_t key) { - uint32_t k1, k2; uint16_t hs = seed >> 16; const uint16_t ending = 0x544D; uint32_t lsb = (uint32_t)hs << 16 | ending; - k1 = subghz_protocol_keeloq_common_encrypt(seed, key); - k2 = subghz_protocol_keeloq_common_encrypt(lsb, key); - return ((uint64_t)k1 << 32) | k2; + uint64_t man = (uint64_t)subghz_protocol_keeloq_common_encrypt(seed, key) << 32 | + subghz_protocol_keeloq_common_encrypt(lsb, key); + return man; } \ No newline at end of file