aboutsummaryrefslogtreecommitdiff
path: root/hw/bt-l2cap.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-07 15:32:56 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-03-07 15:32:56 +0000
commit511d2b140f3ff2f80d14637cdc2f29743a2daa51 (patch)
tree6cf21d1c95846f1c86879c60dffbe6a3eaa8aa6d /hw/bt-l2cap.c
parentc2764719914ff0c4d6c06adafea17629600f21ba (diff)
Sparse fixes: NULL use, header order, ANSI prototypes, static
Fix Sparse warnings: * use NULL instead of plain 0 * rearrange header include order to avoid redefining types accidentally * ANSIfy SLIRP * avoid "restrict" keyword * add static git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6736 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/bt-l2cap.c')
-rw-r--r--hw/bt-l2cap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/bt-l2cap.c b/hw/bt-l2cap.c
index 0abcac0bc1..b22b7615ad 100644
--- a/hw/bt-l2cap.c
+++ b/hw/bt-l2cap.c
@@ -401,7 +401,7 @@ static inline struct bt_l2cap_psm_s *l2cap_psm(
static struct l2cap_chan_s *l2cap_channel_open(struct l2cap_instance_s *l2cap,
int psm, int source_cid)
{
- struct l2cap_chan_s *ch = 0;
+ struct l2cap_chan_s *ch = NULL;
struct bt_l2cap_psm_s *psm_info;
int result, status;
int cid = l2cap_cid_new(l2cap);
@@ -452,7 +452,7 @@ static struct l2cap_chan_s *l2cap_channel_open(struct l2cap_instance_s *l2cap,
static void l2cap_channel_close(struct l2cap_instance_s *l2cap,
int cid, int source_cid)
{
- struct l2cap_chan_s *ch = 0;
+ struct l2cap_chan_s *ch = NULL;
/* According to Volume 3, section 6.1.1, pg 1048 of BT Core V2.0, a
* connection in CLOSED state still responds with a L2CAP_DisconnectRsp
@@ -472,7 +472,7 @@ static void l2cap_channel_close(struct l2cap_instance_s *l2cap,
return;
}
- l2cap->cid[cid] = 0;
+ l2cap->cid[cid] = NULL;
ch->params.close(ch->params.opaque);
qemu_free(ch);
@@ -484,7 +484,7 @@ static void l2cap_channel_close(struct l2cap_instance_s *l2cap,
static void l2cap_channel_config_null(struct l2cap_instance_s *l2cap,
struct l2cap_chan_s *ch)
{
- l2cap_configuration_request(l2cap, ch->remote_cid, 0, 0, 0);
+ l2cap_configuration_request(l2cap, ch->remote_cid, 0, NULL, 0);
ch->config_req_id = l2cap->last_id;
ch->config &= ~L2CAP_CFG_INIT;
}