Skip to content

Commit aea645c

Browse files
tobluxpmladek
authored andcommitted
lib/vsprintf: use bool for local decode variable
The local variable 'decode' is only used as a boolean value - change its data type from int to bool accordingly. Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev> Reviewed-by: Petr Mladek <pmladek@suse.com> Link: https://patch.msgid.link/20260407181835.1053072-2-thorsten.blum@linux.dev Signed-off-by: Petr Mladek <pmladek@suse.com>
1 parent 36776b7 commit aea645c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/vsprintf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1106,7 +1106,7 @@ char *resource_string(char *buf, char *end, struct resource *res,
11061106
2*RSRC_BUF_SIZE + FLAG_BUF_SIZE + RAW_BUF_SIZE)];
11071107

11081108
char *p = sym, *pend = sym + sizeof(sym);
1109-
int decode = (fmt[0] == 'R') ? 1 : 0;
1109+
bool decode = fmt[0] == 'R';
11101110
const struct printf_spec *specp;
11111111

11121112
if (check_pointer(&buf, end, res, spec))
@@ -1131,7 +1131,7 @@ char *resource_string(char *buf, char *end, struct resource *res,
11311131
} else {
11321132
p = string_nocheck(p, pend, "??? ", str_spec);
11331133
specp = &mem_spec;
1134-
decode = 0;
1134+
decode = false;
11351135
}
11361136
if (decode && res->flags & IORESOURCE_UNSET) {
11371137
p = string_nocheck(p, pend, "size ", str_spec);

0 commit comments

Comments
 (0)