mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-01-20 13:50:48 +00:00
mediatek: cast literal value to char
Or the comparison against a signed char is always true, because the literal 0xaa is treated as an unsigned int, to which the signed char is casted during comparison. 0xaa is above the positive values of a signed char and negative signed char values result in values larger than 0xaa when casted to unsigned int. Signed-off-by: Sven Wegener <sven.wegener@stealer.net>
This commit is contained in:
parent
c4f9f9b44c
commit
e9a22ce253
@ -26,7 +26,7 @@
|
||||
#define UBNT_LEDBAR_MAX_BRIGHTNESS 0xff
|
||||
|
||||
#define UBNT_LEDBAR_TRANSACTION_LENGTH 8
|
||||
#define UBNT_LEDBAR_TRANSACTION_SUCCESS 0xaa
|
||||
#define UBNT_LEDBAR_TRANSACTION_SUCCESS (char) 0xaa
|
||||
|
||||
#define UBNT_LEDBAR_TRANSACTION_BLUE_IDX 2
|
||||
#define UBNT_LEDBAR_TRANSACTION_GREEN_IDX 3
|
||||
|
Loading…
Reference in New Issue
Block a user