aboutsummaryrefslogtreecommitdiff
path: root/src/hci/tui
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2009-03-13 00:13:38 +0000
committerMichael Brown <mcb30@etherboot.org>2009-03-13 02:10:21 +0000
commit3c68ff99eaff6e0d615349bdc85ea12ad8345284 (patch)
tree969a335fe8d1685203f7bfe90d07868dcbc1fe34 /src/hci/tui
parent1266d7902bf7f2534ee279671d48613ef9b2434c (diff)
downloadipxe-3c68ff99eaff6e0d615349bdc85ea12ad8345284.zip
ipxe-3c68ff99eaff6e0d615349bdc85ea12ad8345284.tar.gz
ipxe-3c68ff99eaff6e0d615349bdc85ea12ad8345284.tar.bz2
[tables] Incorporate table data type information into table definition
Eliminate the potential for mismatches between table names and the table entry data type by incorporating the data type into the definition of the table, rather than specifying it explicitly in each table accessor method.
Diffstat (limited to 'src/hci/tui')
-rw-r--r--src/hci/tui/settings_ui.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/hci/tui/settings_ui.c b/src/hci/tui/settings_ui.c
index 61f94cd..83a56d3 100644
--- a/src/hci/tui/settings_ui.c
+++ b/src/hci/tui/settings_ui.c
@@ -78,7 +78,7 @@ struct setting_widget {
};
/** Number of registered configuration settings */
-#define NUM_SETTINGS table_num_entries ( struct setting, SETTINGS )
+#define NUM_SETTINGS table_num_entries ( SETTINGS )
static void load_setting ( struct setting_widget *widget ) __nonnull;
static int save_setting ( struct setting_widget *widget ) __nonnull;
@@ -219,8 +219,7 @@ static int edit_setting ( struct setting_widget *widget, int key ) {
static void init_setting_index ( struct setting_widget *widget,
struct settings *settings,
unsigned int index ) {
- struct setting *all_settings =
- table_start ( struct setting, SETTINGS );
+ struct setting *all_settings = table_start ( SETTINGS );
init_setting ( widget, settings, &all_settings[index],
( SETTINGS_LIST_ROW + index ), SETTINGS_LIST_COL );