Skip to contentSkip to conversation

cmd editing: mark erase/tab seqs constant

PATCH New Mike Frysinger 2 participants 2 messages Dec 22, 2010 – Jan 9, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cmd editing: mark erase/tab seqs constant

These strings are only read, so no need to have them be writable.

---
 common/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
common/main.c +2 -2
index d97ccd7..fa7c49d 100644
@@ -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 */
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/1 cmd editing: mark erase/tab seqs constant

Dear Mike Frysinger,

Quoted 6 lines · In message <[email protected]> you wrote:

These strings are only read, so no need to have them be writable.

---
 common/main.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 6 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Death. Destruction. Disease. Horror. That's what war  is  all  about.
That's what makes it a thing to be avoided.
	-- Kirk, "A Taste of Armageddon", stardate 3193.0