summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2007-08-29 14:32:55 +0000
committerMarcel Holtmann <marcel@holtmann.org>2007-08-29 14:32:55 +0000
commitc04e0056db8c4a8dc02b87fb647e300b26ccb207 (patch)
tree1cb9568c3c677736f1c036844c44c7b8fd81b937 /src
parent1160385cf5604689c14d73397d11a0ca1edfcbe7 (diff)
Fix supported commands bit calculation
Diffstat (limited to 'src')
-rw-r--r--src/hci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/hci.c b/src/hci.c
index d3e81d2c..54e57cf3 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -515,7 +515,7 @@ char *hci_commandstostr(uint8_t *commands, char *pref, int width)
m = commands_map;
while (m->str) {
- if (hci_test_bit(m->val, commands))
+ if (commands[m->val / 8] & (1 << (m->val % 8)))
size += strlen(m->str) + (pref ? strlen(pref) : 0) + 3;
m++;
}
@@ -534,7 +534,7 @@ char *hci_commandstostr(uint8_t *commands, char *pref, int width)
m = commands_map;
while (m->str) {
- if (hci_test_bit(m->val, commands)) {
+ if (commands[m->val / 8] & (1 << (m->val % 8))) {
if (strlen(off) + strlen(m->str) > width - 3) {
ptr += sprintf(ptr, "\n%s", pref ? pref : "");
off = ptr;