diff --git a/android/adapter.c b/android/adapter.c
index 521a75f..2e8d2df 100644
--- a/android/adapter.c
+++ b/android/adapter.c
/* Default to DisplayYesNo */
#define DEFAULT_IO_CAPABILITY 0x01
+#define BASELEN_PROP_CHANGED sizeof(struct hal_ev_adapter_props_changed) \
+ + (sizeof(struct hal_property))
static int notification_sk = -1;
/* This list contains addresses which are asked for records */
{
struct hal_ev_adapter_props_changed *ev;
size_t len = strlen((const char *) name);
- uint8_t buf[sizeof(*ev) + sizeof(struct hal_property) + len];
+ uint8_t buf[BASELEN_PROP_CHANGED + len];
memset(buf, 0, sizeof(buf));
ev = (void *) buf;