OSDN Git Service

Replace BT_HDR => BT_HDR_RIGID
[android-x86/system-bt.git] / bta / sys / bta_sys.h
index 445e8b2..c4295d2 100644 (file)
 typedef bool(tBTA_SYS_VS_EVT_HDLR)(uint16_t evt, void* p);
 
 /* event handler function type */
-typedef bool(tBTA_SYS_EVT_HDLR)(BT_HDR* p_msg);
+typedef bool(tBTA_SYS_EVT_HDLR)(BT_HDR_RIGID* p_msg);
+static_assert(
+    sizeof(BT_HDR) == sizeof(BT_HDR_RIGID),
+    "Rigid replacement should be same size struct with flexible member");
 
 /* disable function type */
 typedef void(tBTA_SYS_DISABLE)(void);