mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-26 21:35:16 +00:00
use explicit cast for mallocs
This commit is contained in:
parent
e518bebbb2
commit
b0694ed988
@ -150,7 +150,7 @@ static int h4_open(void *transport_config){
|
||||
}
|
||||
|
||||
// set up data_source
|
||||
hci_transport_h4->ds = malloc(sizeof(data_source_t));
|
||||
hci_transport_h4->ds = (data_source_t*) malloc(sizeof(data_source_t));
|
||||
if (!hci_transport_h4->ds) return -1;
|
||||
hci_transport_h4->uart_fd = fd;
|
||||
hci_transport_h4->ds->fd = fd;
|
||||
@ -284,7 +284,7 @@ static void dummy_handler(uint8_t packet_type, uint8_t *packet, uint16_t size){
|
||||
// get h4 singleton
|
||||
hci_transport_t * hci_transport_h4_instance() {
|
||||
if (hci_transport_h4 == NULL) {
|
||||
hci_transport_h4 = malloc( sizeof(hci_transport_h4_t));
|
||||
hci_transport_h4 = (hci_transport_h4_t*)malloc( sizeof(hci_transport_h4_t));
|
||||
hci_transport_h4->ds = NULL;
|
||||
hci_transport_h4->transport.open = h4_open;
|
||||
hci_transport_h4->transport.close = h4_close;
|
||||
|
Loading…
x
Reference in New Issue
Block a user