xenapi: Resolve Coverity NO_EFFECT

Coverity points out that check (def->uuid) has no effect since it's not
a pointer, rather an array of characters.   Just remove the extranous check.

(cherry picked from commit 467c905909)
This commit is contained in:
John Ferlan 2015-03-10 18:41:18 -04:00 committed by Cole Robinson
parent 2213707b6b
commit 2f26dccb65

View File

@ -455,11 +455,9 @@ createVMRecordFromXml(virConnectPtr conn, virDomainDefPtr def,
*record = xen_vm_record_alloc(); *record = xen_vm_record_alloc();
if (VIR_STRDUP((*record)->name_label, def->name) < 0) if (VIR_STRDUP((*record)->name_label, def->name) < 0)
goto error; goto error;
if (def->uuid) {
virUUIDFormat(def->uuid, uuidStr); virUUIDFormat(def->uuid, uuidStr);
if (VIR_STRDUP((*record)->uuid, uuidStr) < 0) if (VIR_STRDUP((*record)->uuid, uuidStr) < 0)
goto error; goto error;
}
if (STREQ(def->os.type, "hvm")) { if (STREQ(def->os.type, "hvm")) {
char *boot_order = NULL; char *boot_order = NULL;
if (VIR_STRDUP((*record)->hvm_boot_policy, "BIOS order") < 0) if (VIR_STRDUP((*record)->hvm_boot_policy, "BIOS order") < 0)