This is needed to address some compiler errors cleanly, where consumer
functions want this address to be a const pointer.
Sponsored by: The FreeBSD Foundation
MFC after: 3 days
Differential D52310
ng_hci: Cast NG_HCI_BDADDR_ANY to const bdaddr_t * christos on Aug 31 2025, 6:34 PM. Authored by Tags None Referenced Files
Details This is needed to address some compiler errors cleanly, where consumer Sponsored by: The FreeBSD Foundation
Diff Detail
Event Timeline
Comment Actions @markj git-arc(1) for some reason doesn't let me update the diff (maybe the title is the issue?), so here is the new diff: diff --git a/sys/netgraph/bluetooth/include/ng_hci.h b/sys/netgraph/bluetooth/include/ng_hci.h index 44a14e62f4ed..ce3291770740 100644 --- a/sys/netgraph/bluetooth/include/ng_hci.h +++ b/sys/netgraph/bluetooth/include/ng_hci.h @@ -448,7 +448,7 @@ typedef struct { typedef bdaddr_t * bdaddr_p; /* Any BD_ADDR. Note: This is actually 7 bytes (count '\0' terminator) */ -#define NG_HCI_BDADDR_ANY ((bdaddr_p) "\000\000\000\000\000\000") +#define NG_HCI_BDADDR_ANY (&(const bdaddr_t){"\000\000\000\000\000\000"}) /* HCI status return parameter */ typedef struct { Comment Actions The commit and review titles have to match.
Ok. |