Diff between af39e81ae92ed117719a77017adf2bb6b2dc5046 and 4002cf271e3939714296c535a1ed8d4f0d5ac005

Changed Files

File Additions Deletions Status
lib/bluetooth.h +2 -2 modified

Full Patch

diff --git a/lib/bluetooth.h b/lib/bluetooth.h
index ea7373d..0541842 100644
--- a/lib/bluetooth.h
+++ b/lib/bluetooth.h
@@ -141,7 +141,7 @@ enum {
 ({						\
 	struct __attribute__((packed)) {	\
 		typeof(*(ptr)) __v;		\
-	} *__p = (void *) (ptr);		\
+	} *__p = (typeof(__p)) (ptr);		\
 	__p->__v;				\
 })
 
@@ -149,7 +149,7 @@ enum {
 do {						\
 	struct __attribute__((packed)) {	\
 		typeof(*(ptr)) __v;		\
-	} *__p = (void *) (ptr);		\
+	} *__p = (typeof(__p)) (ptr);		\
 	__p->__v = (val);			\
 } while(0)