mirror of
https://github.com/bluekitchen/btstack.git
synced 2025-03-25 16:43:28 +00:00
add 'U' to unsigned constants
This commit is contained in:
parent
1b81ae2adc
commit
5ce1359ee5
6
3rd-party/rijndael/rijndael.c
vendored
6
3rd-party/rijndael/rijndael.c
vendored
@ -694,9 +694,9 @@ static const u32 Td4[256] =
|
||||
|
||||
static const u32 rcon[] =
|
||||
{
|
||||
0x01000000, 0x02000000, 0x04000000, 0x08000000,
|
||||
0x10000000, 0x20000000, 0x40000000, 0x80000000,
|
||||
0x1B000000, 0x36000000,
|
||||
0x01000000U, 0x02000000U, 0x04000000U, 0x08000000U,
|
||||
0x10000000U, 0x20000000U, 0x40000000U, 0x80000000U,
|
||||
0x1B000000U, 0x36000000U,
|
||||
/* for 128-bit blocks, Rijndael never uses more than 10 rcon values */
|
||||
};
|
||||
|
||||
|
@ -199,7 +199,7 @@ void le_device_db_remove(int index){
|
||||
int le_device_db_add(int addr_type, bd_addr_t addr, sm_key_t irk){
|
||||
|
||||
uint32_t highest_seq_nr = 0;
|
||||
uint32_t lowest_seq_nr = 0xFFFFFFFF;
|
||||
uint32_t lowest_seq_nr = 0xFFFFFFFFU;
|
||||
int index_for_lowest_seq_nr = -1;
|
||||
int index_for_addr = -1;
|
||||
int index_for_empty = -1;
|
||||
|
@ -3335,7 +3335,7 @@ static void sm_handle_random_result_ph2_tk(void * arg){
|
||||
|
||||
sm_reset_tk();
|
||||
uint32_t tk;
|
||||
if (sm_fixed_passkey_in_display_role == 0xffffffff){
|
||||
if (sm_fixed_passkey_in_display_role == 0xffffffffU){
|
||||
// map random to 0-999999 without speding much cycles on a modulus operation
|
||||
tk = little_endian_read_32(sm_random_data,0);
|
||||
tk = tk & 0xfffff; // 1048575
|
||||
@ -4410,7 +4410,7 @@ void sm_init(void){
|
||||
sm_max_encryption_key_size = 16;
|
||||
sm_min_encryption_key_size = 7;
|
||||
|
||||
sm_fixed_passkey_in_display_role = 0xffffffff;
|
||||
sm_fixed_passkey_in_display_role = 0xffffffffU;
|
||||
sm_reconstruct_ltk_without_le_device_db_entry = true;
|
||||
|
||||
#ifdef USE_CMAC_ENGINE
|
||||
|
@ -1417,10 +1417,10 @@ static void hci_initializing_run(void){
|
||||
case HCI_INIT_SET_EVENT_MASK:
|
||||
hci_stack->substate = HCI_INIT_W4_SET_EVENT_MASK;
|
||||
if (hci_le_supported()){
|
||||
hci_send_cmd(&hci_set_event_mask,0xffffffff, 0x3FFFFFFF);
|
||||
hci_send_cmd(&hci_set_event_mask,0xFFFFFFFFU, 0x3FFFFFFFU);
|
||||
} else {
|
||||
// Kensington Bluetooth 2.1 USB Dongle (CSR Chipset) returns an error for 0xffff...
|
||||
hci_send_cmd(&hci_set_event_mask,0xffffffff, 0x1FFFFFFF);
|
||||
hci_send_cmd(&hci_set_event_mask,0xFFFFFFFFU, 0x1FFFFFFFU);
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user