From a7be2034ca1f9555bd68418f0daca23c62136b4e Mon Sep 17 00:00:00 2001 From: Vinicius Costa Gomes Date: Fri, 10 Feb 2012 18:40:06 -0300 Subject: [PATCH] hciconfig: Fix compiler warnings related to unaligned memory access --- tools/hciconfig.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/hciconfig.c b/tools/hciconfig.c index 5d01bd9c7..f1458b94c 100644 --- a/tools/hciconfig.c +++ b/tools/hciconfig.c @@ -1305,7 +1305,7 @@ static void cmd_inq_data(int ctl, int hdev, char *opt) printf("\t%s service classes:", type == 0x02 ? "Shortened" : "Complete"); for (i = 0; i < (len - 1) / 2; i++) { - uint16_t val = btohs(bt_get_unaligned((uint16_t *) (ptr + (i * 2)))); + uint16_t val = bt_get_le16((ptr + (i * 2))); printf(" 0x%4.4x", val); } printf("\n"); -- 2.11.0