summaryrefslogtreecommitdiff
path: root/android/handsfree.c
diff options
context:
space:
mode:
authorSzymon Janc <szymon.janc@tieto.com>2014-11-22 15:48:42 +0100
committerSzymon Janc <szymon.janc@tieto.com>2014-11-22 17:01:33 +0100
commit6fc3f7d00d3ada5c72aa7c64c6b0a41d974e5f72 (patch)
tree79f167f7d1be453854851f74424b1fa9097ec378 /android/handsfree.c
parentcd88946db6c6db9a8f88b005690965a08cf0d026 (diff)
downloadbluez-6fc3f7d00d3ada5c72aa7c64c6b0a41d974e5f72.tar.gz
android/handsfree: Open code find_default_device function
It was only used in single place with no benefit comparing to open coding it.
Diffstat (limited to 'android/handsfree.c')
-rw-r--r--android/handsfree.c9
1 files changed, 1 insertions, 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);
}