summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorBruna Moreira <bruna.moreira@openbossa.org>2011-04-27 16:21:03 -0400
committerJohan Hedberg <johan.hedberg@nokia.com>2011-04-27 16:25:02 -0700
commitcef88385008d999c515366ebe6c01e3f6967fb61 (patch)
treeab84b5f5376f241f2a43eabe8e274c3d174722b8 /test
parentcabcf8599c445acb7bad11ac7c94b5989fd9ac54 (diff)
Use HCI_MAX_EIR_LENGTH instead of hard-coded value
Diffstat (limited to 'test')
-rw-r--r--test/hciemu.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/hciemu.c b/test/hciemu.c
index 9950372c..66f99a92 100644
--- a/test/hciemu.c
+++ b/test/hciemu.c
@@ -68,7 +68,7 @@ struct vhci_device {
uint8_t dev_class[3];
uint8_t inq_mode;
uint8_t eir_fec;
- uint8_t eir_data[240];
+ uint8_t eir_data[HCI_MAX_EIR_LENGTH];
uint16_t acl_cnt;
bdaddr_t bdaddr;
int fd;
@@ -714,14 +714,14 @@ static void hci_host_control(uint16_t ocf, int plen, uint8_t *data)
case OCF_READ_EXT_INQUIRY_RESPONSE:
ir.status = 0x00;
ir.fec = vdev.eir_fec;
- memcpy(ir.data, vdev.eir_data, 240);
+ memcpy(ir.data, vdev.eir_data, HCI_MAX_EIR_LENGTH);
command_complete(ogf, ocf, sizeof(ir), &ir);
break;
case OCF_WRITE_EXT_INQUIRY_RESPONSE:
status = 0x00;
vdev.eir_fec = data[0];
- memcpy(vdev.eir_data, data + 1, 240);
+ memcpy(vdev.eir_data, data + 1, HCI_MAX_EIR_LENGTH);
command_complete(ogf, ocf, 1, &status);
break;