diff options
author | Michael Brown | 2009-03-13 01:13:38 +0100 |
---|---|---|
committer | Michael Brown | 2009-03-13 03:10:21 +0100 |
commit | 3c68ff99eaff6e0d615349bdc85ea12ad8345284 (patch) | |
tree | 969a335fe8d1685203f7bfe90d07868dcbc1fe34 /src/hci/tui | |
parent | [tables] Redefine methods for accessing linker tables (diff) | |
download | ipxe-3c68ff99eaff6e0d615349bdc85ea12ad8345284.tar.gz ipxe-3c68ff99eaff6e0d615349bdc85ea12ad8345284.tar.xz ipxe-3c68ff99eaff6e0d615349bdc85ea12ad8345284.zip |
[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.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/hci/tui/settings_ui.c b/src/hci/tui/settings_ui.c index 61f94cde..83a56d3c 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 ); |