From patchwork Wed Jun 3 12:05:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Juan Quintela X-Patchwork-Id: 479906 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id B1E86140213 for ; Wed, 3 Jun 2015 22:09:04 +1000 (AEST) Received: from localhost ([::1]:35078 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z07Ti-000371-NT for incoming@patchwork.ozlabs.org; Wed, 03 Jun 2015 08:09:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:45141) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z07Qz-0006oj-3R for qemu-devel@nongnu.org; Wed, 03 Jun 2015 08:06:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z07Qv-0003kD-3I for qemu-devel@nongnu.org; Wed, 03 Jun 2015 08:06:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:43211) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z07Qu-0003jr-Tg for qemu-devel@nongnu.org; Wed, 03 Jun 2015 08:06:09 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 9C21FB8BCE; Wed, 3 Jun 2015 12:06:08 +0000 (UTC) Received: from trasno.mitica (ovpn-116-79.ams2.redhat.com [10.36.116.79]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t53C5w79004305; Wed, 3 Jun 2015 08:06:07 -0400 From: Juan Quintela To: qemu-devel@nongnu.org Date: Wed, 3 Jun 2015 14:05:41 +0200 Message-Id: <1433333157-9939-6-git-send-email-quintela@redhat.com> In-Reply-To: <1433333157-9939-1-git-send-email-quintela@redhat.com> References: <1433333157-9939-1-git-send-email-quintela@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: amit.shah@redhat.com, zhanghailiang Subject: [Qemu-devel] [PULL 05/21] arch_init: Clean up the duplicate variable 'len' defining in ram_load() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: zhanghailiang There are two places that define 'len' variable, It's OK for compiling, but makes it difficult for reading. Remove the local one which defined in the inside 'while' loop. Signed-off-by: zhanghailiang Signed-off-by: Juan Quintela --- migration/ram.c | 1 - 1 file changed, 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 14b81fc..808e8d2 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -1501,7 +1501,6 @@ static int ram_load(QEMUFile *f, void *opaque, int version_id) total_ram_bytes = addr; while (!ret && total_ram_bytes) { RAMBlock *block; - uint8_t len; char id[256]; ram_addr_t length;