summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitri Pal <dpal@redhat.com>2010-12-23 23:01:45 -0500
committerStephen Gallagher <sgallagh@redhat.com>2011-01-03 13:51:37 -0500
commita10ece2161bdf54e244568661eff283bba95fb5a (patch)
tree834388e879ed6d938ee0e2fddf986a489ccdef9b
parent5a0d623a03f47448177dfba6628381f35e8cfc95 (diff)
downloadding-libs-a10ece2161bdf54e244568661eff283bba95fb5a.tar.gz
ding-libs-a10ece2161bdf54e244568661eff283bba95fb5a.tar.xz
ding-libs-a10ece2161bdf54e244568661eff283bba95fb5a.zip
Coverity issue 10034
The 'len' varible was not initialized properly. The ref_array_get function does not return error so the error check is removed.
-rw-r--r--ini/ini_valueobj.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/ini/ini_valueobj.c b/ini/ini_valueobj.c
index 321cc2c..b1d3fa0 100644
--- a/ini/ini_valueobj.c
+++ b/ini/ini_valueobj.c
@@ -1017,11 +1017,8 @@ extern void ref_array_debug(struct ref_array *ra, int num);
if (ptr) {
/* Get its length */
+ len = 0;
ref_array_get(vo->raw_lengths, i, (void *)&len);
- if (error) {
- TRACE_ERROR_NUMBER("Failed to add string", error);
- return error;
- }
part = *((char **)(ptr));