From a1e51b622a5d7dad098ed0b856c37c18da495692 Mon Sep 17 00:00:00 2001 From: Max Krasnyansky Date: Fri, 22 Nov 2002 21:54:27 +0000 Subject: Fix hci_for_each_dev() to work on big endian machines. --- src/hci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hci.c b/src/hci.c index dcc24666..89d481b4 100644 --- a/src/hci.c +++ b/src/hci.c @@ -369,7 +369,7 @@ int hci_for_each_dev(int flag, int(*func)(int s, int dev_id, long arg), long arg if (s < 0) return -1; - dl = malloc(HCI_MAX_DEV * sizeof(struct hci_dev_req) + sizeof(uint16_t)); + dl = malloc(HCI_MAX_DEV * sizeof(*dr) + sizeof(*dl)); if (!dl) { close(s); return -1; -- cgit