Use uint instead of u_int
This commit is contained in:
parent
6f0f3b3fa7
commit
dc17aab72b
@ -40,7 +40,7 @@
|
|||||||
#undef PROTOCOL_DESCRIPTOR_LIST_MINIMAL_SIZE
|
#undef PROTOCOL_DESCRIPTOR_LIST_MINIMAL_SIZE
|
||||||
#define PROTOCOL_DESCRIPTOR_LIST_MINIMAL_SIZE 12
|
#define PROTOCOL_DESCRIPTOR_LIST_MINIMAL_SIZE 12
|
||||||
|
|
||||||
static int rfcomm_proto_list_parse (u_int8_t const *start, u_int8_t const *end,
|
static int rfcomm_proto_list_parse (uint8_t const *start, uint8_t const *end,
|
||||||
int *channel, int *error);
|
int *channel, int *error);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -62,14 +62,14 @@ int
|
|||||||
rfcomm_channel_lookup(bdaddr_t const *local, bdaddr_t const *remote,
|
rfcomm_channel_lookup(bdaddr_t const *local, bdaddr_t const *remote,
|
||||||
int service, int *channel, int *error)
|
int service, int *channel, int *error)
|
||||||
{
|
{
|
||||||
u_int8_t buffer[PROTOCOL_DESCRIPTOR_LIST_BUFFER_SIZE];
|
uint8_t buffer[PROTOCOL_DESCRIPTOR_LIST_BUFFER_SIZE];
|
||||||
void *ss = NULL;
|
void *ss = NULL;
|
||||||
u_int16_t serv = (u_int16_t) service;
|
uint16_t serv = (uint16_t) service;
|
||||||
u_int32_t attr = SDP_ATTR_RANGE(
|
uint32_t attr = SDP_ATTR_RANGE(
|
||||||
SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST,
|
SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST,
|
||||||
SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST);
|
SDP_ATTR_PROTOCOL_DESCRIPTOR_LIST);
|
||||||
sdp_attr_t proto = { SDP_ATTR_INVALID,0,sizeof(buffer),buffer };
|
sdp_attr_t proto = { SDP_ATTR_INVALID,0,sizeof(buffer),buffer };
|
||||||
u_int32_t type, len;
|
uint32_t type, len;
|
||||||
|
|
||||||
if (local == NULL)
|
if (local == NULL)
|
||||||
local = NG_HCI_BDADDR_ANY;
|
local = NG_HCI_BDADDR_ANY;
|
||||||
@ -172,7 +172,7 @@ rfcomm_channel_lookup(bdaddr_t const *local, bdaddr_t const *remote,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
rfcomm_proto_list_parse(u_int8_t const *start, u_int8_t const *end,
|
rfcomm_proto_list_parse(uint8_t const *start, uint8_t const *end,
|
||||||
int *channel, int *error)
|
int *channel, int *error)
|
||||||
{
|
{
|
||||||
int type, len, value;
|
int type, len, value;
|
||||||
@ -220,10 +220,10 @@ rfcomm_proto_list_parse(u_int8_t const *start, u_int8_t const *end,
|
|||||||
rfcomm_proto_list_parse_exit(EINVAL);
|
rfcomm_proto_list_parse_exit(EINVAL);
|
||||||
|
|
||||||
/* Get protocol UUID */
|
/* Get protocol UUID */
|
||||||
SDP_GET8(type, start); len -= sizeof(u_int8_t);
|
SDP_GET8(type, start); len -= sizeof(uint8_t);
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case SDP_DATA_UUID16:
|
case SDP_DATA_UUID16:
|
||||||
SDP_GET16(value, start); len -= sizeof(u_int16_t);
|
SDP_GET16(value, start); len -= sizeof(uint16_t);
|
||||||
if (value != SDP_UUID_PROTOCOL_RFCOMM)
|
if (value != SDP_UUID_PROTOCOL_RFCOMM)
|
||||||
goto next_protocol;
|
goto next_protocol;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user