projects
/
ossec-hids.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- enable fortify as well
[ossec-hids.git]
/
src
/
os_xml
/
examples
/
test.c
diff --git
a/src/os_xml/examples/test.c
b/src/os_xml/examples/test.c
index
89369d5
..
166a2b6
100755
(executable)
--- a/
src/os_xml/examples/test.c
+++ b/
src/os_xml/examples/test.c
@@
-10,7
+10,7
@@
int main(int argc, char ** argv)
OS_XML xml;
XML_NODE node = NULL;
OS_XML xml;
XML_NODE node = NULL;
-
+
/* File name must be given */
if(argc < 2)
{
/* File name must be given */
if(argc < 2)
{
@@
-18,8
+18,8
@@
int main(int argc, char ** argv)
return(-1);
}
return(-1);
}
-
- /* Reading the XML. Printing error and line number */
+
+ /* Reading the XML. Printing error and line number */
if(OS_ReadXML(argv[1],&xml) < 0)
{
printf("OS_ReadXML error: %s, line :%d\n",xml.err, xml.err_line);
if(OS_ReadXML(argv[1],&xml) < 0)
{
printf("OS_ReadXML error: %s, line :%d\n",xml.err, xml.err_line);
@@
-46,17
+46,17
@@
int main(int argc, char ** argv)
{
int j = 0;
XML_NODE cnode;
{
int j = 0;
XML_NODE cnode;
-
+
cnode = OS_GetElementsbyNode(&xml, node[i]);
if(cnode == NULL)
{
i++;
continue;
}
cnode = OS_GetElementsbyNode(&xml, node[i]);
if(cnode == NULL)
{
i++;
continue;
}
-
+
while(cnode[j])
{
while(cnode[j])
{
- printf("Element: %s -> %s\n",
+ printf("Element: %s -> %s\n",
cnode[j]->element,
cnode[j]->content);
if(cnode[j]->attributes && cnode[j]->values)
cnode[j]->element,
cnode[j]->content);
if(cnode[j]->attributes && cnode[j]->values)