search for: xmldoccopynode

Displaying 3 results from an estimated 3 matches for "xmldoccopynode".

2015 Nov 12
1
[PATCH] inspector: --xpath: Copy node to new document (RHBZ#1281577).
...) ==2254== by 0x53B1276: xmlDoRead (parser.c:15295) ==2254== by 0x40587D: do_xpath (inspector.c:772) ==2254== by 0x40587D: main (inspector.c:250) The cause appears to be that when copying the matching node(s) found by the xpath expression, we have to copy them into the new document (using xmlDocCopyNode instead of xmlCopyNode). This bug has existed since this functionality was originally added in commit d1ee71782ace98a11c5aabaf1f9fd5f601e08367. --- inspector/inspector.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inspector/inspector.c b/inspector/inspector.c index d0013ed...
2016 Apr 04
0
[PATCH 2/2] Use 'error' function for fprintf followed by exit.
...t;1.0"); - if (wrdoc == NULL) { - fprintf (stderr, _("%s: xmlNewDoc failed\n"), - guestfs_int_program_name); - exit (EXIT_FAILURE); - } + if (wrdoc == NULL) + error (EXIT_FAILURE, 0, _("xmlNewDoc failed")); wrnode = xmlDocCopyNode (nodes->nodeTab[i], wrdoc, 1); - if (wrnode == NULL) { - fprintf (stderr, _("%s: xmlCopyNode failed\n"), - guestfs_int_program_name); - exit (EXIT_FAILURE); - } + if (wrnode == NULL) + error (EXIT_FAILURE, 0, _("xmlCopyNode faile...
2016 Apr 04
2
[PATCH 1/2] Use 'error' function consistently throughout.
Wherever we had code which did: if (something_bad) { perror (...); exit (EXIT_FAILURE); } replace this with use of the error(3) function: if (something_bad) error (EXIT_FAILURE, errno, ...); The error(3) function is supplied by glibc, or by gnulib on platforms which don't have it, and is much more flexible than perror(3). Since we already use error(3), there seems to be