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 <spoorthy.priya.yerabolu@intel.com>
This commit is contained in:
parent
7b8bce898f
commit
6d10db3ed6
2 changed files with 2 additions and 2 deletions
|
@ -257,7 +257,7 @@ struct conversion {
|
||||||
bool pad_fp: 1;
|
bool pad_fp: 1;
|
||||||
|
|
||||||
/** Conversion specifier character */
|
/** Conversion specifier character */
|
||||||
char specifier;
|
unsigned char specifier;
|
||||||
|
|
||||||
union {
|
union {
|
||||||
/** Width value from specification.
|
/** Width value from specification.
|
||||||
|
|
|
@ -39,7 +39,7 @@ static void minimal_hexdump_line_print(const char *data, size_t length)
|
||||||
|
|
||||||
for (size_t i = 0; i < HEXDUMP_BYTES_IN_LINE; i++) {
|
for (size_t i = 0; i < HEXDUMP_BYTES_IN_LINE; i++) {
|
||||||
if (i < length) {
|
if (i < length) {
|
||||||
char c = data[i];
|
unsigned char c = data[i];
|
||||||
|
|
||||||
printk("%c", isprint((int)c) ? c : '.');
|
printk("%c", isprint((int)c) ? c : '.');
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue