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

@ -97,10 +97,10 @@ static int cursor_position_get(const struct shell *shell, u16_t *x, u16_t *y)
/* Index start position in the buffer where 'y'
* is stored.
*/
buff_idx = 2;
buff_idx = 2U;
while (shell->ctx->temp_buff[buff_idx] != ';') {
*y = *y * 10 +
*y = *y * 10U +
(shell->ctx->temp_buff[buff_idx++] -
'0');
if (buff_idx >=
@ -115,7 +115,7 @@ static int cursor_position_get(const struct shell *shell, u16_t *x, u16_t *y)
while (shell->ctx->temp_buff[buff_idx]
!= '\0') {
*x = *x * 10 +
*x = *x * 10U +
(shell->ctx->temp_buff[buff_idx++] -
'0');