all: Add 'U' suffix when using unsigned variables

Add a 'U' suffix to values when computing and comparing against
unsigned variables.

Signed-off-by: Patrik Flykt <patrik.flykt@intel.com>
This commit is contained in:
Patrik Flykt 2019-03-26 19:57:45 -06:00 committed by Kumar Gala
commit 24d71431e9
559 changed files with 2331 additions and 2328 deletions

View file

@ -347,9 +347,9 @@ static void buffer_trim(char *buff, u16_t *buff_len)
return;
}
while (isspace((int) buff[*buff_len - 1])) {
*buff_len -= 1;
if (*buff_len == 0) {
while (isspace((int) buff[*buff_len - 1U])) {
*buff_len -= 1U;
if (*buff_len == 0U) {
buff[0] = '\0';
return;
}
@ -364,7 +364,7 @@ static void buffer_trim(char *buff, u16_t *buff_len)
/* Removing counted whitespace characters. */
if (--i > 0) {
memmove(buff, buff + i, (*buff_len + 1) - i); /* +1 for '\0' */
memmove(buff, buff + i, (*buff_len + 1U) - i); /* +1 for '\0' */
*buff_len = *buff_len - i;
}
}