From aebccac7e10eb581e8e7d3354289cfed76860a3e Mon Sep 17 00:00:00 2001 From: Elyes Haouas Date: Tue, 13 Sep 2022 09:56:22 +0200 Subject: src/security: Use "if (!ptr)" in preference to "if (ptr == NULL)" Signed-off-by: Elyes Haouas Change-Id: I3def65c016015d8213824e6b8561d8a67b6d5cf0 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67579 Tested-by: build bot (Jenkins) Reviewed-by: Yu-Ping Wu --- src/security/intel/stm/SmmStm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/security/intel/stm') diff --git a/src/security/intel/stm/SmmStm.c b/src/security/intel/stm/SmmStm.c index 4cb2d0126c..a062bda25b 100644 --- a/src/security/intel/stm/SmmStm.c +++ b/src/security/intel/stm/SmmStm.c @@ -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; } -- cgit v1.2.3