refactor: fix clang-tidy bugprone-signed-char-misuse warnings

Prefer to declare variables with correct type instead of explicit casts
wherever possible.
This commit is contained in:
Dundar Göc
2022-02-27 12:29:33 +01:00
parent 83fc914337
commit 4d2744ffe3
13 changed files with 24 additions and 30 deletions

View File

@ -1110,7 +1110,7 @@ static int json_is_invalid_number(json_parse_t *json)
/* Reject numbers starting with 0x, or leading zeros */
if (*p == '0') {
int ch2 = *(p + 1);
char ch2 = *(p + 1);
if ((ch2 | 0x20) == 'x' || /* Hex */
('0' <= ch2 && ch2 <= '9')) /* Leading zero */