Re: [PATCH 1/2] Bluetooth: Remove unneeded val variable when setting SSP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Anderson,

>> The variable val in the set_ssp() function of the management interface
>> is not needed. Just use cp->val directly since its input values have
>> already been validated.
>> [...]
>> -       if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags) == val) {
>> +       if (!!cp->val == test_bit(HCI_SSP_ENABLED, &hdev->dev_flags)) {
> 
> In this case, the "!!" trick is unnecessary as the only allowed values
> are 0x00 and 0x01 (I believe this has been removed in other similar
> cases).

it has not been removed. That is why I changed it and made it similar to the other case.

Regards

Marcel

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux