From 1bd84ee717bf146c19281cce48a36a2f4d71748d Mon Sep 17 00:00:00 2001 From: Alberto Garcia Date: Thu, 2 Jul 2015 11:06:11 +0300 Subject: qcow2: remove unnecessary check The value of 'i' is guaranteed to be >= 0 Signed-off-by: Alberto Garcia Message-id: 1435824371-2660-1-git-send-email-berto@igalia.com Signed-off-by: Stefan Hajnoczi --- block/qcow2-cache.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'block/qcow2-cache.c') diff --git a/block/qcow2-cache.c b/block/qcow2-cache.c index ed92a098c4..53b8afc3d3 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) { -- cgit v1.2.1