[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 03/23] block: Drop superfluous conditionals around qe
From: |
Stefan Hajnoczi |
Subject: |
[Qemu-devel] [PULL 03/23] block: Drop superfluous conditionals around qemu_opts_del() |
Date: |
Sat, 4 Oct 2014 21:24:29 +0100 |
From: Markus Armbruster <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Reviewed-by: Eric Blake <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
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
- [Qemu-devel] [PULL 00/23] Block patches, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 01/23] snapshot: fix referencing wrong variable in while loop in do_delvm, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 02/23] ssh: Don't crash if either host or path is not specified., Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 04/23] vmdk: Fix integer overflow in offset calculation, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 03/23] block: Drop superfluous conditionals around qemu_opts_del(),
Stefan Hajnoczi <=
- [Qemu-devel] [PULL 05/23] Modify qemu_opt_rename to realize renaming all items in opts, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 06/23] make check-block: Use default cache modes, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 07/23] qemu-iotests: Fix supported cache modes for 052, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 08/23] blockdev: Orphaned drive search, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 09/23] blockdev: Allow overriding if_max_dev property, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 11/23] ide: Update ide_drive_get to be HBA agnostic, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 12/23] qtest/bios-tables: Correct Q35 command line, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 10/23] pc/vl: Add units-per-default-bus property, Stefan Hajnoczi, 2014/10/04
- [Qemu-devel] [PULL 13/23] q35/ahci: Pick up -cdrom and -hda options, Stefan Hajnoczi, 2014/10/04