提交 467c9059 编写于 作者: J John Ferlan

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.
上级 500d77f1
......@@ -455,11 +455,9 @@ createVMRecordFromXml(virConnectPtr conn, virDomainDefPtr def,
*record = xen_vm_record_alloc();
if (VIR_STRDUP((*record)->name_label, def->name) < 0)
goto error;
if (def->uuid) {
virUUIDFormat(def->uuid, uuidStr);
if (VIR_STRDUP((*record)->uuid, uuidStr) < 0)
goto error;
}
virUUIDFormat(def->uuid, uuidStr);
if (VIR_STRDUP((*record)->uuid, uuidStr) < 0)
goto error;
if (STREQ(def->os.type, "hvm")) {
char *boot_order = NULL;
if (VIR_STRDUP((*record)->hvm_boot_policy, "BIOS order") < 0)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册