summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tools/hciconfig.c2
-rw-r--r--tools/hcitool.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/tools/hciconfig.c b/tools/hciconfig.c
index 4b4844ff..1efdecca 100644
--- a/tools/hciconfig.c
+++ b/tools/hciconfig.c
@@ -525,7 +525,7 @@ void print_dev_info(int ctl, struct hci_dev_info *di)
print_link_policy(di);
print_link_mode(di);
- if (di->flags & (1 << HCI_UP)) {
+ if (hci_test_bit(HCI_UP, &di->flags)) {
cmd_name(ctl, di->dev_id, NULL);
cmd_class(ctl, di->dev_id, NULL);
cmd_version(ctl, di->dev_id, NULL);
diff --git a/tools/hcitool.c b/tools/hcitool.c
index f6a98610..68d4aa7a 100644
--- a/tools/hcitool.c
+++ b/tools/hcitool.c
@@ -78,7 +78,7 @@ static int for_each_dev(int flag, int(*func)(int d, long arg), long arg)
return -1;
for (i=0; i < dl->dev_num; i++, dr++) {
- if (dr->dev_opt & (1<<flag)) {
+ if (hci_test_bit(flag, &dr->dev_opt)) {
if (!func || func(dr->dev_id, arg))
return dr->dev_id;
}