diff options
author | Vasilii Chernov <vchernov@inr.ru> | 2016-02-26 11:01:39 +0100 |
---|---|---|
committer | Vasilii Chernov <vchernov@inr.ru> | 2016-02-26 11:01:39 +0100 |
commit | 0e584d07a0776454fd5487b7d23407c0624b56c2 (patch) | |
tree | 1e00cacf2077c5004c4e151d2bf3f9dddbb1b9ea /pcilib/xml.c | |
parent | e2550e6df11558ccd6e8b95f489c0988b34347af (diff) | |
parent | 30d740cc6accc3bd477e6bc924d5b74dad71ee6d (diff) | |
download | pcitool-0e584d07a0776454fd5487b7d23407c0624b56c2.tar.gz pcitool-0e584d07a0776454fd5487b7d23407c0624b56c2.tar.bz2 pcitool-0e584d07a0776454fd5487b7d23407c0624b56c2.tar.xz pcitool-0e584d07a0776454fd5487b7d23407c0624b56c2.zip |
Merge with ufo.kit.edu/csa/pcitool 357 revision
Diffstat (limited to 'pcilib/xml.c')
-rw-r--r-- | pcilib/xml.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/pcilib/xml.c b/pcilib/xml.c index 0463a40..b980a83 100644 --- a/pcilib/xml.c +++ b/pcilib/xml.c @@ -616,8 +616,6 @@ static int pcilib_xml_parse_value_name(pcilib_t *ctx, xmlXPathContextPtr xpath, int min_set = 0, max_set = 0; pcilib_register_value_t val; - memset(desc, 0, sizeof(pcilib_register_value_name_t)); - for (cur = node->properties; cur != NULL; cur = cur->next) { if(!cur->children) continue; if(!xmlNodeIsText(cur->children)) continue; @@ -715,7 +713,7 @@ static int pcilib_xml_create_enum_view(pcilib_t *ctx, xmlXPathContextPtr xpath, pcilib_error("No names is defined for enum view (%s)", desc.base.name); return PCILIB_ERROR_INVALID_DATA; } - + memset(desc.names, 0, (nodeset->nodeNr + 1) * sizeof(pcilib_register_value_name_t)); for (i = 0; i < nodeset->nodeNr; i++) { err = pcilib_xml_parse_value_name(ctx, xpath, doc, nodeset->nodeTab[i], &desc.names[i]); @@ -725,11 +723,9 @@ static int pcilib_xml_create_enum_view(pcilib_t *ctx, xmlXPathContextPtr xpath, return err; } } - memset(&desc.names[nodeset->nodeNr], 0, sizeof(pcilib_register_value_name_t)); xmlXPathFreeObject(nodes); - err = pcilib_add_views_custom(ctx, 1, (pcilib_view_description_t*)&desc, &view_ctx); if (err) { free(desc.names); |