diff options
| author | Thorsten Blum <thorsten.blum@linux.dev> | 2026-04-07 20:18:36 +0200 |
|---|---|---|
| committer | Petr Mladek <pmladek@suse.com> | 2026-04-14 15:58:51 +0200 |
| commit | aea645c02f1acc36088618667e086b62d8f83e92 (patch) | |
| tree | 2eb9a301e1213f05b3f37f0ce5749cb0b7594c19 | |
| parent | 36776b7f8a8955b4e75b5d490a75fee0c7a2a7ef (diff) | |
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>
| -rw-r--r-- | lib/vsprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/vsprintf.c b/lib/vsprintf.c index a3790c43a0ab..2871ffd28103 100644 --- a/lib/vsprintf.c +++ b/lib/vsprintf.c @@ -1106,7 +1106,7 @@ char *resource_string(char *buf, char *end, struct resource *res, 2*RSRC_BUF_SIZE + FLAG_BUF_SIZE + RAW_BUF_SIZE)]; char *p = sym, *pend = sym + sizeof(sym); - int decode = (fmt[0] == 'R') ? 1 : 0; + bool decode = fmt[0] == 'R'; const struct printf_spec *specp; if (check_pointer(&buf, end, res, spec)) @@ -1131,7 +1131,7 @@ char *resource_string(char *buf, char *end, struct resource *res, } else { p = string_nocheck(p, pend, "??? ", str_spec); specp = &mem_spec; - decode = 0; + decode = false; } if (decode && res->flags & IORESOURCE_UNSET) { p = string_nocheck(p, pend, "size ", str_spec); |
