void bt_device_done(struct bt_device_s *dev)

{

    struct bt_device_s **p = &dev->net->slave;



    while (*p && *p != dev)

        p = &(*p)->next;

    if (*p != dev) {

        fprintf(stderr, "%s: bad bt device \"%s\"\n", __FUNCTION__,

                        dev->lmp_name ?: "(null)");

        exit(-1);

    }



    *p = dev->next;

}

void bt_device_done(struct bt_device_s *dev)

{

    struct bt_device_s **p = &dev->net->slave;



    while (*p && *p != dev)

        p = &(*p)->next;

    if (*p != dev) {

        fprintf(stderr, "%s: bad bt device \"%s\"\n", __FUNCTION__,

                        dev->lmp_name ?: "(null)");

        exit(-1);

    }



    *p = dev->next;

}

void FUNC_0(struct bt_device_s *VAR_0)

{

    struct bt_device_s **VAR_1 = &VAR_0->net->slave;



    while (*VAR_1 && *VAR_1 != VAR_0)

        VAR_1 = &(*VAR_1)->next;

    if (*VAR_1 != VAR_0) {

        fprintf(stderr, "%s: bad bt device \"%s\"\n", __FUNCTION__,

                        VAR_0->lmp_name ?: "(null)");

        exit(-1);

    }



    *VAR_1 = VAR_0->next;

}

void FUNC_0(struct bt_device_s *VAR_0)
{ struct bt_device_s **VAR_1 = &VAR_0->net->slave; while (*VAR_1 && *VAR_1 != VAR_0)
VAR_1 = &(*VAR_1)->next; if (*VAR_1 != VAR_0) { fprintf(stderr, "%s: bad bt device \"%s\"\n", __FUNCTION__,
VAR_0->lmp_name ?: "(null)"); exit(-1); } *VAR_1 = VAR_0->next; }