block: Drop superfluous conditionals around qemu_opts_del() Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-id: 1411999675-14533-1-git-send-email-armbru@redhat.com Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
diff --git a/blockdev.c b/blockdev.c index ad43648..2f441c5 100644 --- a/blockdev.c +++ b/blockdev.c
@@ -224,9 +224,7 @@ if (!dinfo) { return; } - if (dinfo->opts) { - qemu_opts_del(dinfo->opts); - } + qemu_opts_del(dinfo->opts); g_free(dinfo->id); QTAILQ_REMOVE(&drives, dinfo, next); g_free(dinfo->serial);
diff --git a/qemu-img.c b/qemu-img.c index ea4bbae..27b85db 100644 --- a/qemu-img.c +++ b/qemu-img.c
@@ -1736,9 +1736,7 @@ qemu_opts_del(opts); qemu_opts_free(create_opts); qemu_vfree(buf); - if (sn_opts) { - qemu_opts_del(sn_opts); - } + qemu_opts_del(sn_opts); if (out_bs) { bdrv_unref(out_bs); }
diff --git a/qemu-nbd.c b/qemu-nbd.c index fa60338..b524b34 100644 --- a/qemu-nbd.c +++ b/qemu-nbd.c
@@ -778,9 +778,7 @@ unlink(sockpath); } - if (sn_opts) { - qemu_opts_del(sn_opts); - } + qemu_opts_del(sn_opts); if (device) { void *ret;