Skip to content

Commit

Permalink
s1kd-validate: Shallow copy nodes to XML report
Browse files Browse the repository at this point in the history
Changed the way nodes are copied to the XML report so that it will only
be a shallow copy of the node (only attributes, no children). This mimics
the s1kd-brexcheck XML report, and prevents the report from becoming
very large if a node with a lot of content is reported.
  • Loading branch information
kibook committed Dec 26, 2024
1 parent 4cf7ed5 commit 2f2edf9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/s1kd-validate/s1kd-validate.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "s1kd_tools.h"

#define PROG_NAME "s1kd-validate"
#define VERSION "4.1.0"
#define VERSION "4.1.1"

#define ERR_PREFIX PROG_NAME ": ERROR: "
#define SUCCESS_PREFIX PROG_NAME ": SUCCESS: "
Expand Down Expand Up @@ -104,7 +104,7 @@ static void add_xml_report_error(const xmlNodePtr report_node, const xmlNodePtr
xpath = xpath_of(node);
xmlSetProp(object, BAD_CAST "xpath", xpath);

xmlAddChild(object, xmlCopyNode(node, 1));
xmlAddChild(object, xmlCopyNode(node, 2));

xmlFree(xpath);
}
Expand Down

0 comments on commit 2f2edf9

Please sign in to comment.