Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9b4600b1 authored by Sharvil Nanavati's avatar Sharvil Nanavati
Browse files

DO NOT MERGE ANYWHERE Fix return value for HAL function config_clear.

Change-Id: I75712f721f7031705d0accb4ffe89467d52d7aa3
parent 5fb100cc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
+1 −1
Original line number Diff line number Diff line
@@ -419,7 +419,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 = {
+2 −2
Original line number Diff line number Diff line
@@ -362,7 +362,7 @@ void btif_config_flush(void) {
  btif_config_write();
}

int btif_config_clear(void){
bool btif_config_clear(void){
  assert(config != NULL);
  assert(alarm_timer != NULL);

@@ -377,7 +377,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;
}