qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v3 10/13] block: Clean up bdrv_snapshots()


From: Markus Armbruster
Subject: [Qemu-devel] [PATCH v3 10/13] block: Clean up bdrv_snapshots()
Date: Thu, 1 Jul 2010 09:30:38 +0200

Signed-off-by: Markus Armbruster <address@hidden>
---
 block.c |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/block.c b/block.c
index acb4182..603874d 100644
--- a/block.c
+++ b/block.c
@@ -1783,19 +1783,18 @@ BlockDriverState *bdrv_snapshots(void)
 {
     BlockDriverState *bs;
 
-    if (bs_snapshots)
+    if (bs_snapshots) {
         return bs_snapshots;
+    }
 
     bs = NULL;
     while ((bs = bdrv_next(bs))) {
         if (bdrv_can_snapshot(bs)) {
-            goto ok;
+            bs_snapshots = bs;
+            return bs;
         }
     }
     return NULL;
- ok:
-    bs_snapshots = bs;
-    return bs;
 }
 
 int bdrv_snapshot_create(BlockDriverState *bs,
-- 
1.6.6.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]