diff options
| author | Doug Anderson <dianders@chromium.org> | 2011-10-19 12:30:57 +0000 | 
|---|---|---|
| committer | Wolfgang Denk <wd@denx.de> | 2011-10-20 16:38:08 +0200 | 
| commit | 3a8653b3ac11b5ee56ce2b8f795826b8bf01eff2 (patch) | |
| tree | e13192c738bcb50238f6a60ef0448b1e2eec516a /common/cmd_bootm.c | |
| parent | eaeecde7bc67b473786d4adc4d923a4798f50d0e (diff) | |
| download | olio-uboot-2014.01-3a8653b3ac11b5ee56ce2b8f795826b8bf01eff2.tar.xz olio-uboot-2014.01-3a8653b3ac11b5ee56ce2b8f795826b8bf01eff2.zip | |
cosmetic: Fixup fixup_silent_linux() for checkpatch
Signed-off-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Anton Staaf <robotboy@chromium.org>
Diffstat (limited to 'common/cmd_bootm.c')
| -rw-r--r-- | common/cmd_bootm.c | 25 | 
1 files changed, 13 insertions, 12 deletions
| diff --git a/common/cmd_bootm.c b/common/cmd_bootm.c index bb9b698d3..ece1b9a1e 100644 --- a/common/cmd_bootm.c +++ b/common/cmd_bootm.c @@ -1200,34 +1200,35 @@ U_BOOT_CMD(  /* helper routines */  /*******************************************************************/  #ifdef CONFIG_SILENT_CONSOLE -static void fixup_silent_linux () +static void fixup_silent_linux(void)  {  	char buf[256], *start, *end; -	char *cmdline = getenv ("bootargs"); +	char *cmdline = getenv("bootargs");  	/* Only fix cmdline when requested */  	if (!(gd->flags & GD_FLG_SILENT))  		return; -	debug ("before silent fix-up: %s\n", cmdline); +	debug("before silent fix-up: %s\n", cmdline);  	if (cmdline) { -		if ((start = strstr (cmdline, "console=")) != NULL) { -			end = strchr (start, ' '); -			strncpy (buf, cmdline, (start - cmdline + 8)); +		start = strstr(cmdline, "console="); +		if (start) { +			end = strchr(start, ' '); +			strncpy(buf, cmdline, (start - cmdline + 8));  			if (end) -				strcpy (buf + (start - cmdline + 8), end); +				strcpy(buf + (start - cmdline + 8), end);  			else  				buf[start - cmdline + 8] = '\0';  		} else { -			strcpy (buf, cmdline); -			strcat (buf, " console="); +			strcpy(buf, cmdline); +			strcat(buf, " console=");  		}  	} else { -		strcpy (buf, "console="); +		strcpy(buf, "console=");  	} -	setenv ("bootargs", buf); -	debug ("after silent fix-up: %s\n", buf); +	setenv("bootargs", buf); +	debug("after silent fix-up: %s\n", buf);  }  #endif /* CONFIG_SILENT_CONSOLE */ |