summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/hcitool.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/hcitool.c b/tools/hcitool.c
index ee810e59..da380520 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -2444,11 +2444,11 @@ static int print_advertising_devices(int dd, uint8_t filter_type)
char name_array[30];
char *name = name_array;
- memset(name, 0, sizeof(name));
+ memset(name, 0, 30);
ba2str(&info->bdaddr, addr);
eir_parse_name(info->data, info->length,
- name, sizeof(name) - 1);
+ name, 29);
printf("%s %s\n", addr, name);
}