From 6262a9b282bf55a0b39abb49f54e18c7cb61c3dd Mon Sep 17 00:00:00 2001 From: John Ferlan Date: Mon, 17 Oct 2016 10:46:00 -0400 Subject: [PATCH] qemu: Remove unnecessary NULL arg check qemuDomainSecret{Disk|Hostdev}Prepare has a prototype that checks for ATTRIBUTE_NONNULL(1) for 'conn'. Signed-off-by: John Ferlan --- src/qemu/qemu_domain.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 0c9416f61d..5e9f08f01c 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -1062,9 +1062,6 @@ qemuDomainSecretDiskPrepare(virConnectPtr conn, qemuDomainDiskPrivatePtr diskPriv = QEMU_DOMAIN_DISK_PRIVATE(disk); qemuDomainSecretInfoPtr secinfo = NULL; - if (!conn) - return 0; - if (qemuDomainSecretDiskCapable(src)) { virSecretUsageType secretUsageType = VIR_SECRET_USAGE_TYPE_ISCSI; @@ -1147,7 +1144,7 @@ qemuDomainSecretHostdevPrepare(virConnectPtr conn, virDomainHostdevSubsysPtr subsys = &hostdev->source.subsys; 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) { virDomainHostdevSubsysSCSIPtr scsisrc = &hostdev->source.subsys.u.scsi; -- GitLab