From 99f9506a6650c3f371900b79118ef9ac856b0454 Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Tue, 2 Feb 2016 09:59:55 +0100 Subject: [PATCH] qemu: hotplug: Remove unnecessary variable --- src/qemu/qemu_hotplug.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index b456fedd5a..01010639fb 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -773,13 +773,12 @@ qemuDomainAttachDeviceDiskLive(virConnectPtr conn, virDomainDiskDefPtr disk = dev->data.disk; virDomainDiskDefPtr orig_disk = NULL; int ret = -1; - const char *driverName = virDomainDiskGetDriver(disk); const char *src = virDomainDiskGetSource(disk); - if (driverName && STRNEQ(driverName, "qemu")) { + if (STRNEQ_NULLABLE(virDomainDiskGetDriver(disk), "qemu")) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("unsupported driver name '%s' for disk '%s'"), - driverName, src); + virDomainDiskGetDriver(disk), src); goto end; } -- GitLab