summaryrefslogtreecommitdiffstats
path: root/ini
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2010-12-24 00:38:48 -0500
committerDmitri Pal <dpal@redhat.com>2011-01-03 15:00:33 -0500
commit2cb4d6ad0bfad2170e09152379f29de2b9c29196 (patch)
tree400c174f087b625491b635e1b0f50bd23794bf04 /ini
parent449b6da753cc4912778905eebe4c03cd9b154d9a (diff)
downloadding-libs-2cb4d6ad0bfad2170e09152379f29de2b9c29196.tar.gz
ding-libs-2cb4d6ad0bfad2170e09152379f29de2b9c29196.tar.xz
ding-libs-2cb4d6ad0bfad2170e09152379f29de2b9c29196.zip
[INI] Making Coverity happy
Coverity found issues 10078 & 10079. This patch should make it happy, however I think that Coverity is wrong unless I am missing something. If I am I hope that this patch would be able to reveal the real issue if any. For now just renaming a variable. [INI] Added missing initialization One liner to initialize a variable.
Diffstat (limited to 'ini')
-rw-r--r--ini/ini_configobj.c2
-rw-r--r--ini/ini_valueobj_ut.c9
2 files changed, 6 insertions, 5 deletions
diff --git a/ini/ini_configobj.c b/ini/ini_configobj.c
index 3e5dec4..5e5e40b 100644
--- a/ini/ini_configobj.c
+++ b/ini/ini_configobj.c
@@ -215,7 +215,7 @@ int ini_config_copy(struct ini_cfgobj *ini_config,
struct ini_cfgobj **ini_new)
{
int error = EOK;
- struct ini_cfgobj *new_co;
+ struct ini_cfgobj *new_co = NULL;
TRACE_FLOW_ENTRY();
diff --git a/ini/ini_valueobj_ut.c b/ini/ini_valueobj_ut.c
index 767a64c..af62c14 100644
--- a/ini/ini_valueobj_ut.c
+++ b/ini/ini_valueobj_ut.c
@@ -378,6 +378,7 @@ int vo_basic_test(void)
*/
struct value_obj *vo = NULL;
+ struct value_obj *other_vo = NULL;
uint32_t wrap = 0;
struct ini_comment *ic = NULL;
FILE *ff = NULL;
@@ -429,7 +430,7 @@ int vo_basic_test(void)
}
/* Run other create test here */
- error = other_create_test(ff, &vo);
+ error = other_create_test(ff, &other_vo);
if (error) {
printf("Create test failed %d.\n", error);
fclose(ff);
@@ -437,15 +438,15 @@ int vo_basic_test(void)
}
/* Run modify test here */
- error = modify_test(ff, vo);
+ error = modify_test(ff, other_vo);
if (error) {
printf("Modify test failed %d.\n", error);
fclose(ff);
- value_destroy(vo);
+ value_destroy(other_vo);
return error;
}
- value_destroy(vo);
+ value_destroy(other_vo);
ic = NULL;