qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [PULL for-2.4 v2 1/6] qcow2: remove unnecessary check


From: Stefan Hajnoczi
Subject: [Qemu-devel] [PULL for-2.4 v2 1/6] qcow2: remove unnecessary check
Date: Tue, 7 Jul 2015 14:29:46 +0100

From: Alberto Garcia <address@hidden>

The value of 'i' is guaranteed to be >= 0

Signed-off-by: Alberto Garcia <address@hidden>
Message-id: address@hidden
Signed-off-by: Stefan Hajnoczi <address@hidden>
---
 block/qcow2-cache.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c
index ed92a09..53b8afc 100644
--- a/block/qcow2-cache.c
+++ b/block/qcow2-cache.c
@@ -281,9 +281,6 @@ static int qcow2_cache_do_get(BlockDriverState *bs, 
Qcow2Cache *c,
     i = min_lru_index;
     trace_qcow2_cache_get_replace_entry(qemu_coroutine_self(),
                                         c == s->l2_table_cache, i);
-    if (i < 0) {
-        return i;
-    }
 
     ret = qcow2_cache_entry_flush(bs, c, i);
     if (ret < 0) {
-- 
2.4.3




reply via email to

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