Parent: f7459450c3cdb24423615e1957f296b479f89aee
Author: Rafal Michalski <michalski.raf@gmail.com>
Committer: Johan Hedberg <johan.hedberg@nokia.com>
Date: 2011-03-23 15:11:23
Tree: 176b395f3f3fa84a6c28708396c19b05ef80d72d
Fix strict aliasing issue in hciops This patch changes type of the "pending" variable to uint32_t. A pointer to this variable is passed to the hci_clear_bit function as void * and then cast to uint32_t * again. Previously the unsigned long type could cause some unexpected behavior due to violating strict aliasing rules. This patch fixes this problem by making sure that the same integer type is used in all places. This solution is simpler than the other option of changing the types of all other places (from uint32_t to unsigned long, including changing type for casting in hci_*_bit function family). Also, not all places can be changed, like the hci_dev_info struct, since it would violate compatibility rules between the kernel and user space.
Diffstat
| M | plugins/hciops.c | | | 2 | +- |
1 files changed, 1 insertions(+), 1 deletions(-)