FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 10-25-2011, 12:08 PM
"Fabio M. Di Nitto"
 
Default configxml: clear variable usage

Spotted by Coverity Scan

Signed-off-by: Fabio M. Di Nitto <fdinitto@redhat.com>
---
:100644 100644 7dcf8ba... 9479bc2... M config/plugins/xml/config.c
config/plugins/xml/config.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/config/plugins/xml/config.c b/config/plugins/xml/config.c
index 7dcf8ba..9479bc2 100644
--- a/config/plugins/xml/config.c
+++ b/config/plugins/xml/config.c
@@ -51,10 +51,12 @@ static void xml_comp_register(void)
lcr_component_register(&xml_comp_ver0);
};

-static void addkeys(xmlAttrPtr tmpattr, struct objdb_iface_ver0 *objdb,
+static void addkeys(xmlAttrPtr tmpattr_in, struct objdb_iface_ver0 *objdb,
hdb_handle_t object_handle)
{
- for (tmpattr = tmpattr; tmpattr; tmpattr = tmpattr->next) {
+ xmlAttrPtr tmpattr;
+
+ for (tmpattr = tmpattr_in; tmpattr; tmpattr = tmpattr->next) {
if (tmpattr->type == XML_ATTRIBUTE_NODE)
objdb->object_key_create_typed(object_handle,
(char *)tmpattr->name,
@@ -66,12 +68,13 @@ static void addkeys(xmlAttrPtr tmpattr, struct objdb_iface_ver0 *objdb,
}
}

-static void xml2objdb(xmlNodePtr tmpnode, struct objdb_iface_ver0 *objdb,
+static void xml2objdb(xmlNodePtr tmpnode_in, struct objdb_iface_ver0 *objdb,
hdb_handle_t parent)
{
hdb_handle_t object_handle = 0;
+ xmlNodePtr tmpnode;

- for (tmpnode = tmpnode; tmpnode; tmpnode = tmpnode->next) {
+ for (tmpnode = tmpnode_in; tmpnode; tmpnode = tmpnode->next) {
if (tmpnode->type == XML_ELEMENT_NODE) {
objdb->object_create(parent, &object_handle,
(char *)tmpnode->name,
--
1.7.4.4
 

Thread Tools




All times are GMT. The time now is 07:26 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org