diff options
| author | Simon Glass <sjg@chromium.org> | 2013-05-15 06:23:58 +0000 | 
|---|---|---|
| committer | Tom Rini <trini@ti.com> | 2013-06-04 16:06:31 -0400 | 
| commit | 4933381a5b221d31305aef94bef990b3c6a65454 (patch) | |
| tree | 1c8323ed862a0fd0f14fd9ca7f47cfd26344f562 /common/main.c | |
| parent | f2abca8459cf873147f37c0a1fe007ccc36a8926 (diff) | |
| download | olio-uboot-2014.01-4933381a5b221d31305aef94bef990b3c6a65454.tar.xz olio-uboot-2014.01-4933381a5b221d31305aef94bef990b3c6a65454.zip | |
main: Fix typos and checkpatch warnings in command line reading
There are a few over-long lines and other checkpatch problems in this area
of the code. Prepare the ground for the next patch by tidying these up.
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'common/main.c')
| -rw-r--r-- | common/main.c | 22 | 
1 files changed, 11 insertions, 11 deletions
| diff --git a/common/main.c b/common/main.c index 38fadac3e..1adfea69a 100644 --- a/common/main.c +++ b/common/main.c @@ -1078,20 +1078,20 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout)  		 * Special character handling  		 */  		switch (c) { -		case '\r':				/* Enter		*/ +		case '\r':			/* Enter		*/  		case '\n':  			*p = '\0';  			puts ("\r\n"); -			return (p - p_buf); +			return p - p_buf; -		case '\0':				/* nul			*/ +		case '\0':			/* nul			*/  			continue; -		case 0x03:				/* ^C - break		*/ +		case 0x03:			/* ^C - break		*/  			p_buf[0] = '\0';	/* discard input */ -			return (-1); +			return -1; -		case 0x15:				/* ^U - erase line	*/ +		case 0x15:			/* ^U - erase line	*/  			while (col > plen) {  				puts (erase_seq);  				--col; @@ -1100,15 +1100,15 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout)  			n = 0;  			continue; -		case 0x17:				/* ^W - erase word	*/ +		case 0x17:			/* ^W - erase word	*/  			p=delete_char(p_buf, p, &col, &n, plen);  			while ((n > 0) && (*p != ' ')) {  				p=delete_char(p_buf, p, &col, &n, plen);  			}  			continue; -		case 0x08:				/* ^H  - backspace	*/ -		case 0x7F:				/* DEL - backspace	*/ +		case 0x08:			/* ^H  - backspace	*/ +		case 0x7F:			/* DEL - backspace	*/  			p=delete_char(p_buf, p, &col, &n, plen);  			continue; @@ -1117,7 +1117,7 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout)  			 * Must be a normal character then  			 */  			if (n < CONFIG_SYS_CBSIZE-2) { -				if (c == '\t') {	/* expand TABs		*/ +				if (c == '\t') {	/* expand TABs */  #ifdef CONFIG_AUTO_COMPLETE  					/* if auto completion triggered just continue */  					*p = '\0'; @@ -1132,7 +1132,7 @@ int readline_into_buffer(const char *const prompt, char *buffer, int timeout)  					char buf[2];  					/* -					 * Echo input using puts() to force am +					 * Echo input using puts() to force an  					 * LCD flush if we are using an LCD  					 */  					++col; |