提交 6262a9b2 编写于 作者: J John Ferlan

qemu: Remove unnecessary NULL arg check

qemuDomainSecret{Disk|Hostdev}Prepare has a prototype that checks for
ATTRIBUTE_NONNULL(1) for 'conn'.
Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
上级 40b6f919
...@@ -1062,9 +1062,6 @@ qemuDomainSecretDiskPrepare(virConnectPtr conn, ...@@ -1062,9 +1062,6 @@ qemuDomainSecretDiskPrepare(virConnectPtr conn,
qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk);
qemuDomainSecretInfoPtr secinfo = NULL; qemuDomainSecretInfoPtr secinfo = NULL;
if (!conn)
return 0;
if (qemuDomainSecretDiskCapable(src)) { if (qemuDomainSecretDiskCapable(src)) {
virSecretUsageType secretUsageType = VIR_SECRET_USAGE_TYPE_ISCSI; virSecretUsageType secretUsageType = VIR_SECRET_USAGE_TYPE_ISCSI;
...@@ -1147,7 +1144,7 @@ qemuDomainSecretHostdevPrepare(virConnectPtr conn, ...@@ -1147,7 +1144,7 @@ qemuDomainSecretHostdevPrepare(virConnectPtr conn,
virDomainHostdevSubsysPtr subsys = &hostdev->source.subsys; virDomainHostdevSubsysPtr subsys = &hostdev->source.subsys;
qemuDomainSecretInfoPtr secinfo = NULL; qemuDomainSecretInfoPtr secinfo = NULL;
if (conn && hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS && if (hostdev->mode == VIR_DOMAIN_HOSTDEV_MODE_SUBSYS &&
subsys->type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI) { subsys->type == VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI) {
virDomainHostdevSubsysSCSIPtr scsisrc = &hostdev->source.subsys.u.scsi; virDomainHostdevSubsysSCSIPtr scsisrc = &hostdev->source.subsys.u.scsi;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册