diff options
author | Dmitri Pal <dpal@redhat.com> | 2010-12-26 21:58:24 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2012-04-05 11:20:09 -0700 |
commit | 56b3277a0eff7a6128f4eaf0ac31bdcdbbfcfae9 (patch) | |
tree | 764176abe94c1527e56e27462601c439666c3f30 /ini/ini_valueobj_ut.c | |
parent | 0513944b4e65415a697190d716551dbeb9a0fa0d (diff) | |
download | ding-libs-56b3277a0eff7a6128f4eaf0ac31bdcdbbfcfae9.tar.gz ding-libs-56b3277a0eff7a6128f4eaf0ac31bdcdbbfcfae9.tar.xz ding-libs-56b3277a0eff7a6128f4eaf0ac31bdcdbbfcfae9.zip |
Initialize variables in loops
It occured to me that one of the issues that Coverity
did not like (and I could not understand what it is
complaining about) is related to intializing the variables
in the loop.
This patch adds initialization in the loops.
Also there was an initialization missing in the ini_configobj.c
Diffstat (limited to 'ini/ini_valueobj_ut.c')
-rw-r--r-- | ini/ini_valueobj_ut.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/ini/ini_valueobj_ut.c b/ini/ini_valueobj_ut.c index cb261fe..0e7959f 100644 --- a/ini/ini_valueobj_ut.c +++ b/ini/ini_valueobj_ut.c @@ -403,6 +403,7 @@ int vo_basic_test(void) return error; } + vo = NULL; error = value_create_new(strvalue, strlen(strvalue), INI_VALUE_CREATED, @@ -542,6 +543,7 @@ int vo_copy_test(void) TRACE_INFO_NUMBER("Iteration:", wrap); + vo_copy = NULL; error = value_copy(vo, &vo_copy); if (error) { printf("Failed to create a new value object %d.\n", error); @@ -560,6 +562,7 @@ int vo_copy_test(void) } /* Get comment from the value */ + ic = NULL; error = value_extract_comment(vo_copy, &ic); if (error) { printf("Failed to extract comment %d.\n", error); |