diff options
| author | Yann Gautier <yann.gautier@st.com> | 2023-01-06 11:47:26 +0100 |
|---|---|---|
| committer | Yann Gautier <yann.gautier@st.com> | 2023-01-10 18:59:58 +0100 |
| commit | 654b65b36d60a9c08e1d0cd88b35cd7bc2c813af (patch) | |
| tree | fa7ab3cef0068d88f9b4df64e7f791748dff9bb7 /drivers | |
| parent | 06d223cb4f54543299b96d40a682e33f9147e192 (diff) | |
| download | arm-trusted-firmware-654b65b36d60a9c08e1d0cd88b35cd7bc2c813af.tar.gz | |
fix(auth): use NULL instead of 0 for pointer check
This was triggered by sparse tool:
drivers/auth/mbedtls/mbedtls_x509_parser.c:481:42: warning:
Using plain integer as NULL pointer
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I392316c2a81ef8da7597e35f136e038f152d19d1
Diffstat (limited to 'drivers')
| -rw-r--r-- | drivers/auth/mbedtls/mbedtls_x509_parser.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/auth/mbedtls/mbedtls_x509_parser.c b/drivers/auth/mbedtls/mbedtls_x509_parser.c index 44b25ba72..637b2ea38 100644 --- a/drivers/auth/mbedtls/mbedtls_x509_parser.c +++ b/drivers/auth/mbedtls/mbedtls_x509_parser.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2015-2022, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2015-2023, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -478,7 +478,7 @@ static int get_auth_param(const auth_param_type_desc_t *type_desc, rc = get_ext(type_desc->cookie, param, param_len); break; case AUTH_PARAM_PUB_KEY: - if (type_desc->cookie != 0) { + if (type_desc->cookie != NULL) { /* Get public key from extension */ rc = get_ext(type_desc->cookie, param, param_len); } else { |
