summaryrefslogtreecommitdiff
path: root/payloads/coreinfo/coreinfo.c
diff options
context:
space:
mode:
authorUwe Hermann <uwe@hermann-uwe.de>2008-07-18 14:08:18 +0000
committerUwe Hermann <uwe@hermann-uwe.de>2008-07-18 14:08:18 +0000
commit941aaee885b27e5e897c056ea804e3d1e221a788 (patch)
tree46b8b67badb0fa10e94a818706dd2633094084bb /payloads/coreinfo/coreinfo.c
parenteafceddf6c224d678d0d48a84db4e3bc493b5d2d (diff)
downloadcoreboot-941aaee885b27e5e897c056ea804e3d1e221a788.tar.xz
Random coding style fixes and simplifications (trivial).
This will even reduce the final payload size a bit. Signed-off-by: Uwe Hermann <uwe@hermann-uwe.de> Acked-by: Uwe Hermann <uwe@hermann-uwe.de> git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3427 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'payloads/coreinfo/coreinfo.c')
-rw-r--r--payloads/coreinfo/coreinfo.c21
1 files changed, 8 insertions, 13 deletions
diff --git a/payloads/coreinfo/coreinfo.c b/payloads/coreinfo/coreinfo.c
index 3f49f53ef2..0c5136c80e 100644
--- a/payloads/coreinfo/coreinfo.c
+++ b/payloads/coreinfo/coreinfo.c
@@ -77,7 +77,6 @@ struct coreinfo_cat {
}
};
-
static WINDOW *modwin;
static WINDOW *menuwin;
@@ -121,14 +120,14 @@ static void print_time_and_date(void)
{
struct tm tm;
- while(nvram_updating())
+ while (nvram_updating())
mdelay(10);
rtc_read_clock(&tm);
mvwprintw(menuwin, 0, 57, "%02d/%02d/%04d - %02d:%02d:%02d",
- tm.tm_mon, tm.tm_mday, 1900+tm.tm_year, tm.tm_hour,
- tm.tm_min, tm.tm_sec);
+ tm.tm_mon, tm.tm_mday, 1900+tm.tm_year, tm.tm_hour,
+ tm.tm_min, tm.tm_sec);
}
#endif
@@ -184,8 +183,6 @@ static void header(int row, const char *str)
ptr += sprintf(ptr, "[ %s ]", str);
-
-
for (i = ((SCREEN_X - len) / 2) + len; i < SCREEN_X; i++)
ptr += sprintf(ptr, "=");
@@ -207,10 +204,8 @@ static void handle_category_key(struct coreinfo_cat *cat, int key)
{
if (key >= 'a' && key <= 'z') {
int index = key - 'a';
-
if (index < cat->count) {
-
- cat->cur = index;
+ cat->cur = index;
redraw_module(cat);
return;
}
@@ -296,7 +291,7 @@ int main(void)
wrefresh(modwin);
for (i = 0; i < ARRAY_SIZE(categories); i++) {
- for(j = 0; j < categories[i].count; j++)
+ for (j = 0; j < categories[i].count; j++)
categories[i].modules[j]->init();
}
@@ -306,6 +301,6 @@ int main(void)
return 0;
}
-PAYLOAD_INFO(name,"coreinfo");
-PAYLOAD_INFO(listname,"System Information");
-PAYLOAD_INFO(desc,"Display information about the system");
+PAYLOAD_INFO(name, "coreinfo");
+PAYLOAD_INFO(listname, "System Information");
+PAYLOAD_INFO(desc, "Display information about the system");