Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Thorsten Blum and committed by
Petr Mladek
aea645c0 36776b7f

+2 -2
+2 -2
lib/vsprintf.c
··· 1106 1106 2*RSRC_BUF_SIZE + FLAG_BUF_SIZE + RAW_BUF_SIZE)]; 1107 1107 1108 1108 char *p = sym, *pend = sym + sizeof(sym); 1109 - int decode = (fmt[0] == 'R') ? 1 : 0; 1109 + bool decode = fmt[0] == 'R'; 1110 1110 const struct printf_spec *specp; 1111 1111 1112 1112 if (check_pointer(&buf, end, res, spec)) ··· 1131 1131 } else { 1132 1132 p = string_nocheck(p, pend, "??? ", str_spec); 1133 1133 specp = &mem_spec; 1134 - decode = 0; 1134 + decode = false; 1135 1135 } 1136 1136 if (decode && res->flags & IORESOURCE_UNSET) { 1137 1137 p = string_nocheck(p, pend, "size ", str_spec);