summaryrefslogtreecommitdiffstats
path: root/src/device.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2008-11-08 16:14:34 +0200
committerJohan Hedberg <johan.hedberg@nokia.com>2008-11-08 16:14:34 +0200
commit878dee664d16eb6643e0ba2d5d9c2452f98f172e (patch)
treed889a5fe825b8a0b76fada09176c8f55dd50158c /src/device.c
parentcdfe8a8246013031f55c647092e41adbb29ace81 (diff)
Make device_match_patter() more readable by using more intuitive variable names
Diffstat (limited to 'src/device.c')
-rw-r--r--src/device.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/device.c b/src/device.c
index b3300061..4c999f40 100644
--- a/src/device.c
+++ b/src/device.c
@@ -621,29 +621,28 @@ static GSList *pattern_to_list(sdp_list_t *pattern)
}
static GSList *device_match_pattern(struct btd_device *device,
- const char *pattern,
+ const char *match_uuid,
GSList *profiles)
{
GSList *l, *uuids = NULL;
for (l = profiles; l; l = l->next) {
- const char *uuid = l->data;
+ char *profile_uuid = l->data;
const sdp_record_t *rec;
- GSList *patterns;
-
- rec = btd_device_get_record(device, uuid);
+ GSList *record_uuids;
+ rec = btd_device_get_record(device, profile_uuid);
if (!rec)
continue;
- patterns = pattern_to_list(rec->pattern);
+ record_uuids = pattern_to_list(rec->pattern);
- if (g_slist_find_custom(patterns, pattern,
+ if (g_slist_find_custom(record_uuids, match_uuid,
(GCompareFunc) strcasecmp))
- uuids = g_slist_append(uuids, uuid);
+ uuids = g_slist_append(uuids, profile_uuid);
- g_slist_foreach(patterns, (GFunc) g_free, NULL);
- g_slist_free(patterns);
+ g_slist_foreach(record_uuids, (GFunc) g_free, NULL);
+ g_slist_free(record_uuids);
}
return uuids;