From patchwork Thu Jun 16 16:37:11 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 1979 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id CB12618817 for ; Thu, 16 Jun 2011 16:37:20 +0000 (UTC) Received: from mail-vx0-f180.google.com (mail-vx0-f180.google.com [209.85.220.180]) by fiordland.canonical.com (Postfix) with ESMTP id 94B77A1804D for ; Thu, 16 Jun 2011 16:37:20 +0000 (UTC) Received: by vxk12 with SMTP id 12so1844538vxk.11 for ; Thu, 16 Jun 2011 09:37:20 -0700 (PDT) Received: by 10.52.95.194 with SMTP id dm2mr5275vdb.47.1308242239980; Thu, 16 Jun 2011 09:37:19 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.52.183.130 with SMTP id em2cs199477vdc; Thu, 16 Jun 2011 09:37:19 -0700 (PDT) Received: by 10.227.28.129 with SMTP id m1mr1161305wbc.20.1308242238625; Thu, 16 Jun 2011 09:37:18 -0700 (PDT) Received: from mnementh.archaic.org.uk (mnementh.archaic.org.uk [81.2.115.146]) by mx.google.com with ESMTPS id fe15si885934wbb.0.2011.06.16.09.37.17 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 16 Jun 2011 09:37:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) client-ip=81.2.115.146; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of pm215@archaic.org.uk designates 81.2.115.146 as permitted sender) smtp.mail=pm215@archaic.org.uk Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.72) (envelope-from ) id 1QXFZD-00029o-7u; Thu, 16 Jun 2011 17:37:15 +0100 From: Peter Maydell To: qemu-devel@nongnu.org Cc: patches@linaro.org, Juan Quintela , Riku Voipio Subject: [PATCH 4/8] flatload: end_code was only used in a debug message Date: Thu, 16 Jun 2011 17:37:11 +0100 Message-Id: <1308242235-8261-5-git-send-email-peter.maydell@linaro.org> X-Mailer: git-send-email 1.7.2.5 In-Reply-To: <1308242235-8261-1-git-send-email-peter.maydell@linaro.org> References: <1308242235-8261-1-git-send-email-peter.maydell@linaro.org> From: Juan Quintela Just unfold its definition in only use. Signed-off-by: Juan Quintela [peter.maydell@linaro.org: fixed typo in the debug code, added parentheses to fix precedence issue] Signed-off-by: Peter Maydell --- linux-user/flatload.c | 5 ++--- 1 files changed, 2 insertions(+), 3 deletions(-) diff --git a/linux-user/flatload.c b/linux-user/flatload.c index cd7af7c..6fb78f5 100644 --- a/linux-user/flatload.c +++ b/linux-user/flatload.c @@ -384,7 +384,7 @@ static int load_flat_file(struct linux_binprm * bprm, abi_ulong reloc = 0, rp; int i, rev, relocs = 0; abi_ulong fpos; - abi_ulong start_code, end_code; + abi_ulong start_code; abi_ulong indx_len; hdr = ((struct flat_hdr *) bprm->buf); /* exec-header */ @@ -552,11 +552,10 @@ static int load_flat_file(struct linux_binprm * bprm, /* The main program needs a little extra setup in the task structure */ start_code = textpos + sizeof (struct flat_hdr); - end_code = textpos + text_len; DBG_FLT("%s %s: TEXT=%x-%x DATA=%x-%x BSS=%x-%x\n", id ? "Lib" : "Load", bprm->filename, - (int) start_code, (int) end_code, + (int) start_code, (int) (textpos + text_len), (int) datapos, (int) (datapos + data_len), (int) (datapos + data_len),