switch (hci->lm.inquiry_mode) {
case 0x00:
- return bt_hci_inquiry_result_standard(hci, slave);
+ bt_hci_inquiry_result_standard(hci, slave);
+ return;
case 0x01:
- return bt_hci_inquiry_result_with_rssi(hci, slave);
+ bt_hci_inquiry_result_with_rssi(hci, slave);
+ return;
default:
fprintf(stderr, "%s: bad inquiry mode %02x\n", __FUNCTION__,
hci->lm.inquiry_mode);
struct bt_hci_s *hci = hci_from_device(link->slave);
evt_conn_request params;
- if (hci->conn_req_host)
- return bt_hci_connection_reject(hci, link->host,
- HCI_REJECTED_LIMITED_RESOURCES);
+ if (hci->conn_req_host) {
+ bt_hci_connection_reject(hci, link->host,
+ HCI_REJECTED_LIMITED_RESOURCES);
+ return;
+ }
hci->conn_req_host = link->host;
/* TODO: if masked and auto-accept, then auto-accept,
* if masked and not auto-accept, then auto-reject */
/* TODO: notify upper layer */
struct bt_hci_s *s = opaque;
- return s->info.evt_recv(s->info.opaque, s->evt_buf, len);
+ s->info.evt_recv(s->info.opaque, s->evt_buf, len);
}
static int bt_hci_bdaddr_set(struct HCIInfo *info, const uint8_t *bd_addr)
{
struct bt_hci_s *hci = hci_from_device(dev);
- return bt_hci_done(&hci->info);
+ bt_hci_done(&hci->info);
}
struct HCIInfo *bt_new_hci(struct bt_scatternet_s *net)
/* Be gentle and send DISCONNECT to all connected peers and those
* currently waiting for us to accept or reject a connection request.
* This frees the links. */
- if (hci->conn_req_host)
- return bt_hci_connection_reject(hci,
- hci->conn_req_host, HCI_OE_POWER_OFF);
+ if (hci->conn_req_host) {
+ bt_hci_connection_reject(hci,
+ hci->conn_req_host, HCI_OE_POWER_OFF);
+ return;
+ }
for (handle = HCI_HANDLE_OFFSET;
handle < (HCI_HANDLE_OFFSET | HCI_HANDLES_MAX); handle ++)
static void fw_cfg_io_writeb(void *opaque, uint32_t addr, uint32_t value)
{
- return fw_cfg_write(opaque, (uint8_t)value);
+ fw_cfg_write(opaque, (uint8_t)value);
}
static void fw_cfg_io_writew(void *opaque, uint32_t addr, uint32_t value)
static void fw_cfg_mem_writeb(void *opaque, target_phys_addr_t addr,
uint32_t value)
{
- return fw_cfg_write(opaque, (uint8_t)value);
+ fw_cfg_write(opaque, (uint8_t)value);
}
static void fw_cfg_mem_writew(void *opaque, target_phys_addr_t addr,