mirror of
https://github.com/hathach/tinyusb.git
synced 2025-12-01 12:24:17 +00:00
Fixed more alert found by PVS-Studio
This commit is contained in:
@ -165,7 +165,7 @@ static inline size_t board_usb_get_serial(uint16_t desc_str1[], size_t max_chars
|
||||
'0', '1', '2', '3', '4', '5', '6', '7',
|
||||
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'
|
||||
};
|
||||
const uint8_t nibble = (uint8_t) ((uid[i] >> (j * 4)) & 0xf);
|
||||
const uint8_t nibble = (uint8_t) ((uid[i] >> (j * 4u)) & 0xfu);
|
||||
desc_str1[i * 2 + (1 - j)] = nibble_to_hex[nibble]; // UTF-16-LE
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user