Diff between 1bf376e9502f490408719202b164e83550aa76c3 and b8c3c64af376c41d708ac59e4781e8525f88bc7d

Changed Files

File Additions Deletions Status
tools/hcidump.c +3 -1 modified

Full Patch

diff --git a/tools/hcidump.c b/tools/hcidump.c
index 14816b5..1b80bae 100644
--- a/tools/hcidump.c
+++ b/tools/hcidump.c
@@ -281,9 +281,11 @@ static int process_frames(int dev, int sock, int fd, unsigned long flags)
 
 		cmsg = CMSG_FIRSTHDR(&msg);
 		while (cmsg) {
+			int dir;
 			switch (cmsg->cmsg_type) {
 			case HCI_CMSG_DIR:
-				memcpy(&frm.in, CMSG_DATA(cmsg), sizeof(int));
+				memcpy(&dir, CMSG_DATA(cmsg), sizeof(int));
+				frm.in = (uint8_t) dir;
 				break;
 			case HCI_CMSG_TSTAMP:
 				memcpy(&frm.ts, CMSG_DATA(cmsg),