qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block: Drop superfluous conditionals around qemu_opts_del()
@ 2014-09-29 14:07 Markus Armbruster
  2014-09-29 16:20 ` Eric Blake
  2014-09-30  9:58 ` Stefan Hajnoczi
  0 siblings, 2 replies; 3+ messages in thread
From: Markus Armbruster @ 2014-09-29 14:07 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, stefanha

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] block: Drop superfluous conditionals around qemu_opts_del()
  2014-09-29 14:07 [Qemu-devel] [PATCH] block: Drop superfluous conditionals around qemu_opts_del() Markus Armbruster
@ 2014-09-29 16:20 ` Eric Blake
  2014-09-30  9:58 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Blake @ 2014-09-29 16:20 UTC (permalink / raw)
  To: Markus Armbruster, qemu-devel; +Cc: kwolf, stefanha

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

On 09/29/2014 08:07 AM, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  blockdev.c | 4 +---
>  qemu-img.c | 4 +---
>  qemu-nbd.c | 4 +---
>  3 files changed, 3 insertions(+), 9 deletions(-)

Reviewed-by: Eric Blake <eblake@redhat.com>

Made superfluous in commit 4782183.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH] block: Drop superfluous conditionals around qemu_opts_del()
  2014-09-29 14:07 [Qemu-devel] [PATCH] block: Drop superfluous conditionals around qemu_opts_del() Markus Armbruster
  2014-09-29 16:20 ` Eric Blake
@ 2014-09-30  9:58 ` Stefan Hajnoczi
  1 sibling, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2014-09-30  9:58 UTC (permalink / raw)
  To: Markus Armbruster; +Cc: kwolf, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 339 bytes --]

On Mon, Sep 29, 2014 at 04:07:55PM +0200, Markus Armbruster wrote:
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  blockdev.c | 4 +---
>  qemu-img.c | 4 +---
>  qemu-nbd.c | 4 +---
>  3 files changed, 3 insertions(+), 9 deletions(-)

Thanks, applied to my block tree:
https://github.com/stefanha/qemu/commits/block

Stefan

[-- Attachment #2: Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-09-30  9:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-29 14:07 [Qemu-devel] [PATCH] block: Drop superfluous conditionals around qemu_opts_del() Markus Armbruster
2014-09-29 16:20 ` Eric Blake
2014-09-30  9:58 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).