mirror of
https://github.com/elua/elua.git
synced 2025-01-08 20:56:17 +08:00
Fix compiler warnings due to mismatched type comparisons (NULL vs '\0')
This commit is contained in:
parent
909d6a6b02
commit
8601560ff0
@ -825,7 +825,7 @@ void USBD_GetString(uint8_t *desc, uint8_t *unicode, uint16_t *len)
|
||||
unicode[idx++] = *len;
|
||||
unicode[idx++] = USB_DESC_TYPE_STRING;
|
||||
|
||||
while (*desc != NULL)
|
||||
while (*desc != '\0')
|
||||
{
|
||||
unicode[idx++] = *desc++;
|
||||
unicode[idx++] = 0x00;
|
||||
@ -843,7 +843,7 @@ static uint8_t USBD_GetLen(uint8_t *buf)
|
||||
{
|
||||
uint8_t len = 0;
|
||||
|
||||
while (*buf != NULL)
|
||||
while (*buf != '\0')
|
||||
{
|
||||
len++;
|
||||
buf++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user