From 3c68ff99eaff6e0d615349bdc85ea12ad8345284 Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Fri, 13 Mar 2009 00:13:38 +0000 Subject: [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. --- src/hci/tui/settings_ui.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/hci/tui') diff --git a/src/hci/tui/settings_ui.c b/src/hci/tui/settings_ui.c index 61f94cdea..83a56d3c0 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 ); -- cgit v1.2.3-55-g7522