From 6fc3f7d00d3ada5c72aa7c64c6b0a41d974e5f72 Mon Sep 17 00:00:00 2001 From: Szymon Janc Date: Sat, 22 Nov 2014 15:48:42 +0100 Subject: [PATCH] android/handsfree: Open code find_default_device function It was only used in single place with no benefit comparing to open coding it. --- android/handsfree.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/android/handsfree.c b/android/handsfree.c index aa8765ec9..7475744b0 100644 --- a/android/handsfree.c +++ b/android/handsfree.c @@ -275,13 +275,6 @@ static void device_destroy(struct hf_device *dev) free(dev); } -static struct hf_device *find_default_device(void) -{ - /* TODO should be replaced by find_device() eventually */ - - return queue_peek_head(devices); -} - static bool match_by_bdaddr(const void *data, const void *match_data) { const struct hf_device *dev = data; @@ -293,7 +286,7 @@ static bool match_by_bdaddr(const void *data, const void *match_data) static struct hf_device *find_device(const bdaddr_t *bdaddr) { if (!bacmp(bdaddr, BDADDR_ANY)) - return find_default_device(); + return queue_peek_head(devices); return queue_find(devices, match_by_bdaddr, bdaddr); } -- 2.47.3