summaryrefslogtreecommitdiff
path: root/profiles
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-08-06 17:00:27 +0300
committerLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2014-08-08 13:54:25 +0300
commit2da5bbf7fca7e6a17d3861d9ea75c23e71d487eb (patch)
tree0d0f21505213365f29889382ba21d08a468ff82d /profiles
parent9c0bafd99fb239453b59b08604fff556bc9f15d2 (diff)
downloadbluez-2da5bbf7fca7e6a17d3861d9ea75c23e71d487eb.tar.gz
input/hog: Remove unnecessary variables
Diffstat (limited to 'profiles')
-rw-r--r--profiles/input/hog.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/profiles/input/hog.c b/profiles/input/hog.c
index 30f9ed12c..b9aba657a 100644
--- a/profiles/input/hog.c
+++ b/profiles/input/hog.c
@@ -333,33 +333,30 @@ static void forward_report(struct uhid_event *ev, void *user_data)
struct report *report, cmp;
GSList *l;
uint8_t *data;
- int size, type, id;
+ int size;
switch (ev->u.output.rtype) {
case UHID_FEATURE_REPORT:
- type = HOG_REPORT_TYPE_FEATURE;
+ cmp.type = HOG_REPORT_TYPE_FEATURE;
break;
case UHID_OUTPUT_REPORT:
- type = HOG_REPORT_TYPE_OUTPUT;
+ cmp.type = HOG_REPORT_TYPE_OUTPUT;
break;
case UHID_INPUT_REPORT:
- type = HOG_REPORT_TYPE_INPUT;
+ cmp.type = HOG_REPORT_TYPE_INPUT;
break;
default:
return;
}
- id = 0;
+ cmp.id = 0;
data = ev->u.output.data;
size = ev->u.output.size;
if (hogdev->has_report_id && size > 0) {
- id = *data++;
+ cmp.id = *data++;
--size;
}
- cmp.type = type;
- cmp.id = id;
-
l = g_slist_find_custom(hogdev->reports, &cmp, report_cmp);
if (!l)
return;
@@ -367,7 +364,7 @@ static void forward_report(struct uhid_event *ev, void *user_data)
report = l->data;
DBG("Sending report type %d ID %d to device 0x%04X handle 0x%X",
- type, id, hogdev->id, report->decl->value_handle);
+ cmp.type, cmp.id, hogdev->id, report->decl->value_handle);
if (hogdev->attrib == NULL)
return;