Skip to contentSkip to conversation

qcow2: remove unnecessary check

PATCH Applied Alberto Garcia 2 participants 2 messages Jul 2, 2015 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qcow2: remove unnecessary check

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

---
 block/qcow2-cache.c | 3 ---
 1 file changed, 3 deletions(-)
block/qcow2-cache.c +0 -3
index ed92a09..53b8afc 100644
@@ -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) {
Signature · 1 line
2.1.4