diff --git a/android/bluetooth.c b/android/bluetooth.c
index d71e81f..f1e5458 100644
--- a/android/bluetooth.c
+++ b/android/bluetooth.c
g_strfreev(uuids);
}
-static int bdaddr_cmp(gconstpointer a, gconstpointer b)
+static int device_match(gconstpointer a, gconstpointer b)
{
- const bdaddr_t *bda = a;
- const bdaddr_t *bdb = b;
+ const struct device *dev = a;
+ const bdaddr_t *bdaddr = b;
- return bacmp(bdb, bda);
+ return bacmp(&dev->bdaddr, bdaddr);
}
static struct device *find_device(const bdaddr_t *bdaddr)
{
GSList *l;
- l = g_slist_find_custom(devices, bdaddr, bdaddr_cmp);
+ l = g_slist_find_custom(devices, bdaddr, device_match);
if (l)
return l->data;