diff options
author | Max Krasnyansky <maxk@qualcomm.com> | 2002-05-08 17:00:05 +0000 |
---|---|---|
committer | Max Krasnyansky <maxk@qualcomm.com> | 2002-05-08 17:00:05 +0000 |
commit | 6446efe312e0410efc4c45dc68f5d980755f0666 (patch) | |
tree | 15171f90a2cc364c10726c305c52a3a6c11c090c /tools | |
parent | 79095069d348e61dc26c6fa6e35428c5d90887ff (diff) |
Use hci_test_bit instead of (1<<bit)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/hciconfig.c | 2 | ||||
-rw-r--r-- | tools/hcitool.c | 2 |
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; } |