From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44539) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYbcX-0005Yl-TZ for qemu-devel@nongnu.org; Mon, 29 Sep 2014 10:08:16 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYbcR-0004MW-Ou for qemu-devel@nongnu.org; Mon, 29 Sep 2014 10:08:09 -0400 Received: from mx1.redhat.com ([209.132.183.28]:62634) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYbcR-0004Lq-IL for qemu-devel@nongnu.org; Mon, 29 Sep 2014 10:08:03 -0400 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s8TE7wDk024501 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 29 Sep 2014 10:07:58 -0400 From: Markus Armbruster Date: Mon, 29 Sep 2014 16:07:55 +0200 Message-Id: <1411999675-14533-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH] block: Drop superfluous conditionals around qemu_opts_del() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, stefanha@redhat.com Signed-off-by: Markus Armbruster --- blockdev.c | 4 +--- qemu-img.c | 4 +--- qemu-nbd.c | 4 +--- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/blockdev.c b/blockdev.c index ad43648..2f441c5 100644 --- a/blockdev.c +++ b/blockdev.c @@ -224,9 +224,7 @@ void drive_info_del(DriveInfo *dinfo) 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 @@ out: 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 @@ int main(int argc, char **argv) unlink(sockpath); } - if (sn_opts) { - qemu_opts_del(sn_opts); - } + qemu_opts_del(sn_opts); if (device) { void *ret; -- 1.9.3