From d0d0c2fb41c2e61b69b5dc9e38f3e60843f4388d Mon Sep 17 00:00:00 2001 From: YatianXU Date: Sat, 7 Sep 2019 04:33:35 -0400 Subject: Change the for loop initial declarations to avoid adding -std=c99 in CFLAGS. As strdup() provided by POSIX returns "address out of bould" in C99 mode, which may cause program crash. Issue-ID: VNFSDK-465 Signed-off-by: YatianXU Change-Id: I57f55edd939d64c2e201a345fe83659048308d50 --- .../evel/evel-library/code/evel_library/evel_voicequality.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_voicequality.c') diff --git a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_voicequality.c b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_voicequality.c index 1a77e76..4f454fb 100644 --- a/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_voicequality.c +++ b/veslibrary/ves_clibrary/evel/evel-library/code/evel_library/evel_voicequality.c @@ -536,8 +536,8 @@ void evel_json_encode_voice_quality(EVEL_JSON_BUFFER * jbuf, evel_json_checkpoint(jbuf); if (evel_json_open_opt_named_object(jbuf, "additionalInformation")) { - - for(unsigned int idx = 0; idx < ht->size; idx++ ) + unsigned int idx = 0; + for(; idx < ht->size; idx++ ) { /*****************************************************************/ /* Get the first entry of a particular Key and loop through the */ -- cgit 1.2.3-korg