From 75c13f31ddfff477c121b4a2f381fce2007176a5 Mon Sep 17 00:00:00 2001 From: Clement Faure Date: Tue, 22 Aug 2023 14:35:05 +0200 Subject: [PATCH] lib: libutee: initialize variables in TEE_GetPropertyAsString() Initialize local variables at declaration as specified by the coding guidelines. Signed-off-by: Clement Faure --- lib/libutee/tee_api_property.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/libutee/tee_api_property.c b/lib/libutee/tee_api_property.c index 177e11a3dd1..5f33e2ca802 100644 --- a/lib/libutee/tee_api_property.c +++ b/lib/libutee/tee_api_property.c @@ -199,14 +199,14 @@ TEE_Result TEE_GetPropertyAsString(TEE_PropSetHandle propsetOrEnumerator, const char *name, char *value, size_t *value_len) { - TEE_Result res; - size_t l; + TEE_Result res = TEE_ERROR_GENERIC; + size_t l = 0; enum user_ta_prop_type type = USER_TA_PROP_TYPE_INVALID; void *tmp_buf = 0; - uint32_t tmp_len; - uint32_t uint32_val; - bool bool_val; - TEE_Identity *p_identity_val; + uint32_t tmp_len = 0; + uint32_t uint32_val = 0; + bool bool_val = false; + TEE_Identity *p_identity_val = NULL; if (is_propset_pseudo_handle(propsetOrEnumerator)) __utee_check_instring_annotation(name);