From 5a08b434c7ddecb9cab0f8aedd9db679ca35395c Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 18 Mar 2008 00:48:23 +0000 Subject: [Settings] show_setting() functions return snprintf()-style length. show_setting() and related functions now return an "actual length" in the style of snprintf(). This is to allow consumers to allocate buffers large enough to hold the formatted setting. --- src/hci/tui/settings_ui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/hci/tui') diff --git a/src/hci/tui/settings_ui.c b/src/hci/tui/settings_ui.c index 336af4e91..c6261c77f 100644 --- a/src/hci/tui/settings_ui.c +++ b/src/hci/tui/settings_ui.c @@ -118,7 +118,7 @@ static void load_setting ( struct setting_widget *widget ) { /* Read current setting value */ if ( show_setting ( widget->context, widget->setting, - widget->value, sizeof ( widget->value ) ) != 0 ) { + widget->value, sizeof ( widget->value ) ) < 0 ) { widget->value[0] = '\0'; } -- cgit v1.2.3-55-g7522