"uint" is not a type diff --git a/zrtp/ZRtp.cpp b/zrtp/ZRtp.cpp index 8799f4c..74e2485 100755 --- a/zrtp/ZRtp.cpp +++ b/zrtp/ZRtp.cpp @@ -947,7 +947,7 @@ ZrtpPacketConfirm* ZRtp::prepareConfirm2(ZrtpPacketConfirm* confirm1, uint32_t* // Use the Responder's keys here because we are Initiator here and // receive packets from Responder - uint32_t hmlen = (confirm1->getLength() - (uint)9) * ZRTP_WORD_SIZE; + uint32_t hmlen = (confirm1->getLength() - 9U) * ZRTP_WORD_SIZE; // Use negotiated HMAC (hash) hmacFunction(hmacKeyR, hashLength, confirm1->getHashH0(), hmlen, confMac, &macLen); @@ -1033,7 +1033,7 @@ ZrtpPacketConfirm* ZRtp::prepareConfirm2(ZrtpPacketConfirm* confirm1, uint32_t* getZidCacheInstance()->saveRecord(zidRec); // Encrypt and HMAC with Initiator's key - we are Initiator here - hmlen = (zrtpConfirm2.getLength() - (uint)9) * ZRTP_WORD_SIZE; + hmlen = (zrtpConfirm2.getLength() - 9U) * ZRTP_WORD_SIZE; cipher->getEncrypt()(zrtpKeyI, cipher->getKeylen(), randomIV, zrtpConfirm2.getHashH0(), hmlen); // Use negotiated HMAC (hash) @@ -1154,7 +1154,7 @@ ZrtpPacketConf2Ack* ZRtp::prepareConf2Ack(ZrtpPacketConfirm *confirm2, uint32_t* // Use the Initiator's keys here because we are Responder here and // reveice packets from Initiator - uint32_t hmlen = (confirm2->getLength() - (uint)9) * ZRTP_WORD_SIZE; + uint32_t hmlen = (confirm2->getLength() - 9U) * ZRTP_WORD_SIZE; // Use negotiated HMAC (hash) hmacFunction(hmacKeyI, hashLength, confirm2->getHashH0(), hmlen, confMac, &macLen); @@ -2844,7 +2844,7 @@ bool ZRtp::sendSASRelayPacket(uint8_t* sh, std::string render) { zrtpSasRelay.setTrustedSas(sh); zrtpSasRelay.setSasAlgo((uint8_t*)render.c_str()); - uint32_t hmlen = (zrtpSasRelay.getLength() - (uint)9) * ZRTP_WORD_SIZE; + uint32_t hmlen = (zrtpSasRelay.getLength() - 9U) * ZRTP_WORD_SIZE; cipher->getEncrypt()(ekey, cipher->getKeylen(), randomIV, (uint8_t*)zrtpSasRelay.getFiller(), hmlen); // Use negotiated HMAC (hash)