'xmlNewDoc' and 'xmlNewDocComment' return NULL only on allocation
failure. Attempting to raise an error is pointless.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Laine Stump <laine@redhat.com>
goto cleanup;
}
xml = xmlNewDoc(BAD_CAST "1.0");
- if (!xml) {
- virReportOOMError();
- goto cleanup;
- }
+ if (!xml)
+ abort();
cur = virXMLNewNode(NULL, "VirtualBox");
"OVERWRITTEN AND LOST.\n"
"Changes to this xml configuration should be made using Virtualbox\n"
"or other application using the libvirt API");
- if (!cur) {
- virReportOOMError();
- goto cleanup;
- }
+ if (!cur)
+ abort();
if (!xmlAddPrevSibling(xmlDocGetRootElement(xml), cur)) {
virReportError(VIR_ERR_XML_ERROR, "%s",