incorrectStringBooleanError CPPCheck warnings fix on W27

This commit is contained in:
Vaibhav Shrivastava
2023-07-12 17:43:05 +05:30
parent cf387a48ec
commit ae751e13ca
7 changed files with 21 additions and 21 deletions
+2 -2
View File
@@ -184,7 +184,7 @@ void aes_128_cbc_cmac(const aes_128_t* k_iv, byte_array_t msg, size_t len_out, u
sz_iv = 16;
iv = (uint8_t*)k_iv->iv16.iv;
} else {
DevAssert(0!=0 && "Unknwon Initialization vector");
AssertFatal(0 != 0, "Unknwon Initialization vector");
}
CMAC_Update(ctx, iv, sz_iv);
@@ -233,7 +233,7 @@ void cipher_aes_128_cbc_cmac(cbc_cmac_ctx_t const* ctx, const aes_128_t* k_iv, b
sz_iv = 16;
iv = (uint8_t*)k_iv->iv16.iv;
} else {
DevAssert(0!=0 && "Unknwon Initialization vector");
AssertFatal(0 != 0, "Unknwon Initialization vector");
}
CMAC_Update(ctx->mac, iv, sz_iv);
+1 -1
View File
@@ -49,7 +49,7 @@ void aes_128_ctr(const aes_128_t* k_iv, byte_array_t msg, size_t len_out, uint8_
int len_ev = 0;
rc = EVP_EncryptUpdate(ctx, out, &len_ev, msg.buf, msg.len);
DevAssert(!(len_ev > len_out) && "Buffer overflow");
AssertFatal(!(len_ev > len_out), "Buffer overflow");
// Finalise the encryption. Normally ciphertext bytes may be written at
// this stage, but this does not occur in GCM mode
+1 -1
View File
@@ -40,7 +40,7 @@ void aes_128_ecb(const aes_128_t* k_iv, byte_array_t msg, size_t len_out, uint8_
int len_ev = 0;
rc = EVP_EncryptUpdate(ctx, out, &len_ev, msg.buf, msg.len);
DevAssert(!(len_ev > len_out) && "Buffer overflow");
AssertFatal(!(len_ev > len_out), "Buffer overflow");
// Finalise the encryption. Normally ciphertext bytes may be written at
// this stage, but this does not occur in GCM mode
+2 -2
View File
@@ -43,7 +43,7 @@ void stream_compute_integrity(eia_alg_id_e alg, nas_stream_cipher_t const* strea
nas_stream_encrypt_eia2(stream_cipher, out);
} else {
LOG_E(OSA, "Provided integrity algorithm is currently not supported = %u\n", alg);
DevAssert(0 != 0 && "Unknown Algorithm type");
AssertFatal(0 != 0, "Unknown Algorithm type");
}
}
@@ -60,7 +60,7 @@ void stream_compute_encrypt(eea_alg_id_e alg, nas_stream_cipher_t const* stream_
nas_stream_encrypt_eea2(stream_cipher, out);
} else {
LOG_E(OSA, "Provided encrypt algorithm is currently not supported = %u\n", alg);
DevAssert(0 != 0 && "Unknown Algorithm type");
AssertFatal(0 != 0, "Unknown Algorithm type");
}
}