From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZAZVv-0000pf-WB for qemu-devel@nongnu.org; Thu, 02 Jul 2015 04:06:35 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZAZVs-0004B5-Lu for qemu-devel@nongnu.org; Thu, 02 Jul 2015 04:06:31 -0400 From: Alberto Garcia Date: Thu, 2 Jul 2015 11:06:11 +0300 Message-Id: <1435824371-2660-1-git-send-email-berto@igalia.com> Subject: [Qemu-devel] [PATCH] qcow2: remove unnecessary check List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Alberto Garcia , Stefan Hajnoczi , qemu-block@nongnu.org The value of 'i' is guaranteed to be >= 0 Signed-off-by: Alberto Garcia --- 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.1.4