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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user