Skip to content

Commit 6d10db3

Browse files
yeraboluioannisg
authored andcommitted
Coding guideline: Fixing code violations for 21.13 Rule
Any value passed to a function in <ctype.h> shall be representable as an unsigned char or be the value EOF. So changed type of variable to unsigned char. Signed-off-by: Spoorthy Priya Yerabolu <[email protected]>
1 parent 7b8bce8 commit 6d10db3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/os/cbprintf_complete.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ struct conversion {
257257
bool pad_fp: 1;
258258

259259
/** Conversion specifier character */
260-
char specifier;
260+
unsigned char specifier;
261261

262262
union {
263263
/** Width value from specification.

subsys/logging/log_minimal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ static void minimal_hexdump_line_print(const char *data, size_t length)
3939

4040
for (size_t i = 0; i < HEXDUMP_BYTES_IN_LINE; i++) {
4141
if (i < length) {
42-
char c = data[i];
42+
unsigned char c = data[i];
4343

4444
printk("%c", isprint((int)c) ? c : '.');
4545
} else {

0 commit comments

Comments
 (0)