From patchwork Wed Dec 22 14:40:45 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Frysinger X-Patchwork-Id: 76411 X-Patchwork-Delegate: wd@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id CB492B7093 for ; Thu, 23 Dec 2010 01:40:50 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 265B128131; Wed, 22 Dec 2010 15:40:49 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PNA6Q5rSPczp; Wed, 22 Dec 2010 15:40:49 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 15D5028138; Wed, 22 Dec 2010 15:40:48 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7A22628139 for ; Wed, 22 Dec 2010 15:40:46 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id z6IwHXuyEk4Q for ; Wed, 22 Dec 2010 15:40:46 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by theia.denx.de (Postfix) with ESMTPS id 016E428131 for ; Wed, 22 Dec 2010 15:40:44 +0100 (CET) Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id 076251B4241 for ; Wed, 22 Dec 2010 14:40:42 +0000 (UTC) From: Mike Frysinger To: u-boot@lists.denx.de Date: Wed, 22 Dec 2010 09:40:45 -0500 Message-Id: <1293028845-16111-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.7.3.4 Subject: [U-Boot] [PATCH] cmd editing: mark erase/tab seqs constant X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de These strings are only read, so no need to have them be writable. Signed-off-by: Mike Frysinger --- common/main.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/common/main.c b/common/main.c index d97ccd7..fa7c49d 100644 --- a/common/main.c +++ b/common/main.c @@ -71,8 +71,8 @@ static int abortboot(int); char console_buffer[CONFIG_SYS_CBSIZE + 1]; /* console I/O buffer */ static char * delete_char (char *buffer, char *p, int *colp, int *np, int plen); -static char erase_seq[] = "\b \b"; /* erase sequence */ -static char tab_seq[] = " "; /* used to expand TABs */ +static const char erase_seq[] = "\b \b"; /* erase sequence */ +static const char tab_seq[] = " "; /* used to expand TABs */ #ifdef CONFIG_BOOT_RETRY_TIME static uint64_t endtime = 0; /* must be set, default is instant timeout */