common/console: coding style cleanup

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
This commit is contained in:
Jean-Christophe PLAGNIOL-VILLARD 2009-02-01 17:07:51 +01:00 committed by Wolfgang Denk
parent daaf74f176
commit ec6f149946
1 changed files with 101 additions and 98 deletions

View File

@ -434,7 +434,8 @@ inline void dbg(const char *fmt, ...)
i = vsprintf(printbuffer, fmt, args); i = vsprintf(printbuffer, fmt, args);
va_end(args); va_end(args);
if ((screen + sizeof(screen) - 1 - cursor) < strlen(printbuffer)+1) { if ((screen + sizeof(screen) - 1 - cursor)
< strlen(printbuffer) + 1) {
memset(screen, 0, sizeof(screen)); memset(screen, 0, sizeof(screen));
cursor = screen; cursor = screen;
} }
@ -500,7 +501,7 @@ int console_init_f (void)
gd->flags |= GD_FLG_SILENT; gd->flags |= GD_FLG_SILENT;
#endif #endif
return (0); return 0;
} }
#ifdef CONFIG_SYS_CONSOLE_IS_IN_ENV #ifdef CONFIG_SYS_CONSOLE_IS_IN_ENV
@ -630,9 +631,9 @@ done:
#if 0 #if 0
/* If nothing usable installed, use only the initial console */ /* If nothing usable installed, use only the initial console */
if ((stdio_devices[stdin] == NULL) && (stdio_devices[stdout] == NULL)) if ((stdio_devices[stdin] == NULL) && (stdio_devices[stdout] == NULL))
return (0); return 0;
#endif #endif
return (0); return 0;
} }
#else /* CONFIG_SYS_CONSOLE_IS_IN_ENV */ #else /* CONFIG_SYS_CONSOLE_IS_IN_ENV */
@ -647,8 +648,10 @@ int console_init_r (void)
device_t *dev; device_t *dev;
#ifdef CONFIG_SPLASH_SCREEN #ifdef CONFIG_SPLASH_SCREEN
/* suppress all output if splash screen is enabled and we have /*
a bmp to display */ * suppress all output if splash screen is enabled and we have
* a bmp to display
*/
if (getenv("splashimage") != NULL) if (getenv("splashimage") != NULL)
gd->flags |= GD_FLG_SILENT; gd->flags |= GD_FLG_SILENT;
#endif #endif
@ -719,10 +722,10 @@ int console_init_r (void)
#if 0 #if 0
/* If nothing usable installed, use only the initial console */ /* If nothing usable installed, use only the initial console */
if ((stdio_devices[stdin] == NULL) && (stdio_devices[stdout] == NULL)) if ((stdio_devices[stdin] == NULL) && (stdio_devices[stdout] == NULL))
return (0); return 0;
#endif #endif
return (0); return 0;
} }
#endif /* CONFIG_SYS_CONSOLE_IS_IN_ENV */ #endif /* CONFIG_SYS_CONSOLE_IS_IN_ENV */