mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-01-27 06:35:20 +00:00
use parentheses for sizeof argument, use correct size
This commit is contained in:
parent
356170583a
commit
0f0f1bb49a
@ -548,8 +548,8 @@ connection_t * socket_connection_open_tcp(const char *address, uint16_t port){
|
||||
}
|
||||
// connect
|
||||
char* addr = localhost->h_addr_list[0];
|
||||
memcpy(&btdaemon_address.sin_addr.s_addr, addr, sizeof addr);
|
||||
if(connect(btsocket, (struct sockaddr*)&btdaemon_address, sizeof btdaemon_address) == -1){
|
||||
memcpy(&btdaemon_address.sin_addr.s_addr, addr, sizeof (struct in_addr));
|
||||
if(connect(btsocket, (struct sockaddr*)&btdaemon_address, sizeof (btdaemon_address)) == -1){
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user