From 9ca88af1d964c546af1c3dc2c16c4c98071fd5b1 Mon Sep 17 00:00:00 2001 From: Sharvil Nanavati Date: Tue, 26 Jan 2016 13:09:22 -0800 Subject: [PATCH] Fix return value for HAL function config_clear. Change-Id: I75712f721f7031705d0accb4ffe89467d52d7aa3 --- btif/include/btif_config.h | 2 +- btif/src/bluetooth.c | 2 +- btif/src/btif_config.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/btif/include/btif_config.h b/btif/include/btif_config.h index 4dc897ad0..15b747962 100644 --- a/btif/include/btif_config.h +++ b/btif/include/btif_config.h @@ -46,7 +46,7 @@ const char *btif_config_section_name(const btif_config_section_iter_t *section); void btif_config_save(void); void btif_config_flush(void); -int btif_config_clear(void); +bool btif_config_clear(void); // TODO(zachoverflow): Eww...we need to move these out. These are peer specific, not config general. bool btif_get_address_type(const BD_ADDR bd_addr, int *p_addr_type); diff --git a/btif/src/bluetooth.c b/btif/src/bluetooth.c index 630766e3e..236bfc3e0 100644 --- a/btif/src/bluetooth.c +++ b/btif/src/bluetooth.c @@ -435,7 +435,7 @@ static int set_os_callouts(bt_os_callouts_t *callouts) { static int config_clear(void) { LOG_INFO("%s", __func__); - return btif_config_clear(); + return btif_config_clear() ? BT_STATUS_SUCCESS : BT_STATUS_FAIL; } static const bt_interface_t bluetoothInterface = { diff --git a/btif/src/btif_config.c b/btif/src/btif_config.c index 5f389b4a1..426b73945 100644 --- a/btif/src/btif_config.c +++ b/btif/src/btif_config.c @@ -373,7 +373,7 @@ void btif_config_flush(void) { pthread_mutex_unlock(&lock); } -int btif_config_clear(void){ +bool btif_config_clear(void){ assert(config != NULL); assert(config_timer != NULL); @@ -388,7 +388,7 @@ int btif_config_clear(void){ return false; } - int ret = config_save(config, CONFIG_FILE_PATH); + bool ret = config_save(config, CONFIG_FILE_PATH); pthread_mutex_unlock(&lock); return ret; } -- 2.11.0