summaryrefslogtreecommitdiffstats
path: root/input/manager.c
diff options
context:
space:
mode:
authorJohan Hedberg <johan.hedberg@nokia.com>2007-10-12 11:00:32 +0000
committerJohan Hedberg <johan.hedberg@nokia.com>2007-10-12 11:00:32 +0000
commit3571ae843629585caf996c73200bbbfd05c260a6 (patch)
treef07ed2281fbc83a4c486c47451bc1d7055f22ede /input/manager.c
parentf6d1f79b0382b03dc01d3bb823c8c3eb70f82457 (diff)
Fix hidp_connad_req usage
Diffstat (limited to 'input/manager.c')
-rw-r--r--input/manager.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/input/manager.c b/input/manager.c
index cd2e8a1d..13e5cdba 100644
--- a/input/manager.c
+++ b/input/manager.c
@@ -288,6 +288,8 @@ static gboolean interrupt_connect_cb(GIOChannel *chan,
int isk, ret, err;
socklen_t len;
+ memset(&hidp, 0, sizeof(hidp));
+
isk = g_io_channel_unix_get_fd(chan);
if (cond & G_IO_NVAL) {
@@ -316,7 +318,6 @@ static gboolean interrupt_connect_cb(GIOChannel *chan,
goto failed;
}
- memset(&hidp, 0, sizeof(struct hidp_connadd_req));
extract_hid_record(pr->hid_rec, &hidp);
if (pr->pnp_rec)
extract_pnp_record(pr->pnp_rec, &hidp);
@@ -1045,7 +1046,7 @@ static void stored_input(char *key, char *value, void *data)
str2ba(key, &dst);
- memset(&hidp, 0, sizeof(struct hidp_connadd_req));
+ memset(&hidp, 0, sizeof(hidp));
if (parse_stored_device_info(value, &hidp) < 0)
return;
@@ -1080,7 +1081,7 @@ static void stored_hidd(char *key, char *value, void *data)
return;
}
- memset(&hidp, 0, sizeof(struct hidp_connadd_req));
+ memset(&hidp, 0, sizeof(hidp));
if (parse_stored_hidd(value, &hidp) < 0)
return;