Revision 511d2b14 hw/bt-l2cap.c

b/hw/bt-l2cap.c
401 401
static struct l2cap_chan_s *l2cap_channel_open(struct l2cap_instance_s *l2cap,
402 402
                int psm, int source_cid)
403 403
{
404
    struct l2cap_chan_s *ch = 0;
404
    struct l2cap_chan_s *ch = NULL;
405 405
    struct bt_l2cap_psm_s *psm_info;
406 406
    int result, status;
407 407
    int cid = l2cap_cid_new(l2cap);
......
452 452
static void l2cap_channel_close(struct l2cap_instance_s *l2cap,
453 453
                int cid, int source_cid)
454 454
{
455
    struct l2cap_chan_s *ch = 0;
455
    struct l2cap_chan_s *ch = NULL;
456 456

  
457 457
    /* According to Volume 3, section 6.1.1, pg 1048 of BT Core V2.0, a
458 458
     * connection in CLOSED state still responds with a L2CAP_DisconnectRsp
......
472 472
            return;
473 473
        }
474 474

  
475
        l2cap->cid[cid] = 0;
475
        l2cap->cid[cid] = NULL;
476 476

  
477 477
        ch->params.close(ch->params.opaque);
478 478
        qemu_free(ch);
......
484 484
static void l2cap_channel_config_null(struct l2cap_instance_s *l2cap,
485 485
                struct l2cap_chan_s *ch)
486 486
{
487
    l2cap_configuration_request(l2cap, ch->remote_cid, 0, 0, 0);
487
    l2cap_configuration_request(l2cap, ch->remote_cid, 0, NULL, 0);
488 488
    ch->config_req_id = l2cap->last_id;
489 489
    ch->config &= ~L2CAP_CFG_INIT;
490 490
}

Also available in: Unified diff