src/security: Use "if (!ptr)" in preference to "if (ptr == NULL)"

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: I3def65c016015d8213824e6b8561d8a67b6d5cf0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67579
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
This commit is contained in:
Elyes Haouas
2022-09-13 09:56:22 +02:00
committed by Felix Held
parent a6b41f2fd0
commit aebccac7e1
6 changed files with 10 additions and 10 deletions

View File

@@ -481,7 +481,7 @@ int add_pi_resource(STM_RSC *resource_list, uint32_t num_entries)
if (resource_size == 0)
return -1; // INVALID_PARAMETER;
if (m_stm_resources_ptr == NULL) {
if (!m_stm_resources_ptr) {
// Copy EndResource for initialization
m_stm_resources_ptr = stm_resource_heap;
@@ -522,7 +522,7 @@ int add_pi_resource(STM_RSC *resource_list, uint32_t num_entries)
*/
int32_t delete_pi_resource(STM_RSC *resource_list, uint32_t num_entries)
{
if (resource_list != NULL) {
if (resource_list) {
// ASSERT (false);
return -1; // UNSUPPORTED;
}