]> git.karo-electronics.de Git - karo-tx-linux.git/commit
Bluetooth: Use unsigned int instead of signed int
authorMikel Astiz <mikel.astiz@bmw-carit.de>
Wed, 11 Apr 2012 06:48:47 +0000 (08:48 +0200)
committerGustavo Padovan <gustavo@padovan.org>
Fri, 13 Apr 2012 21:57:13 +0000 (18:57 -0300)
commitba5041c40f9035b3ce55756ede9de941018d3b9e
tree3a22cfd59500b750003f38259cfa3ef3828aed2e
parentc2a837f46a4241f5c68ae1b6d49be2467be34e90
Bluetooth: Use unsigned int instead of signed int

The involved values are all unsigned and thus unsigned int should be
used instead of signed int. Assigning ~0 to a signed int results in -1,
which is confusing and error-prone, while the code is trying to set the
maximum value possible.

The code still works because the C standard defines that unsigned
comparison will be performed in these cases, when comparing an unsigned
int and a signed int.

Signed-off-by: Mikel Astiz <mikel.astiz.oss@gmail.com>
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Signed-off-by: Gustavo Padovan <gustavo@padovan.org>
net/bluetooth/hci_core.c