Additional fix to readline_into_buffer() with CONFIG_CMDLINE_EDITING before relocating
authorPeter Tyser <ptyser@xes-inc.com>
Thu, 22 May 2008 23:56:52 +0000 (18:56 -0500)
committerWolfgang Denk <wd@denx.de>
Tue, 3 Jun 2008 19:33:27 +0000 (21:33 +0200)
Removed unneeded command line history initialization.  Also, the original
code would access the 'initted' variable before relocation to SDRAM
which resulted in erratic behavior since the bss is not initialized when
executing from flash.

Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
common/main.c

index a17b60b3aa92cecc9b4bbcaf78c83a84af8d7a8f..046da6f23ca488d02f3fb900c48fc2b96caafb9e 100644 (file)
@@ -940,12 +940,6 @@ int readline_into_buffer (const char *const prompt, char * buffer)
        int rc;
        static int initted = 0;
 
-       if (!initted) {
-               hist_init();
-               initted = 1;
-       }
-
-
        /*
         * History uses a global array which is not
         * writable until after relocation to RAM.