From 8100e0c660e200a9d789dcd054f25a20778379cd Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Sun, 22 Feb 2004 13:22:36 +0000 Subject: Fix 64-bit size_t problem with HCI events --- hcid/main.c | 5 +++-- hcid/security.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/hcid/main.c b/hcid/main.c index c3f4131d..2d1d5686 100644 --- a/hcid/main.c +++ b/hcid/main.c @@ -397,10 +397,11 @@ static inline void device_event(GIOChannel *chan, evt_stack_internal *si) gboolean io_stack_event(GIOChannel *chan, GIOCondition cond, gpointer data) { - char buf[HCI_MAX_FRAME_SIZE], *ptr; + unsigned char buf[HCI_MAX_FRAME_SIZE], *ptr; evt_stack_internal *si; hci_event_hdr *eh; - int len, type; + int type; + size_t len; GIOError err; ptr = buf; diff --git a/hcid/security.c b/hcid/security.c index 189bc7d8..4f0d942e 100644 --- a/hcid/security.c +++ b/hcid/security.c @@ -365,9 +365,10 @@ reject: gboolean io_security_event(GIOChannel *chan, GIOCondition cond, gpointer data) { - char buf[HCI_MAX_EVENT_SIZE], *ptr = buf; + unsigned char buf[HCI_MAX_EVENT_SIZE], *ptr = buf; struct hci_dev_info *di = (void *) data; - int len, type, dev; + int type, dev; + size_t len; hci_event_hdr *eh; GIOError err; -- cgit