mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
lib/bootconfig: fix signed comparison in xbc_node_get_data()
lib/bootconfig.c:188:28: warning: comparison of integer expressions of different signedness: 'int' and 'size_t' [-Wsign-compare] The local variable 'offset' is declared as int, but xbc_data_size is size_t. Change the type to size_t to match and eliminate the warning. Link: https://lore.kernel.org/all/20260318155919.78168-10-objecting@objecting.org/ Signed-off-by: Josh Law <objecting@objecting.org> Signed-off-by: Masami Hiramatsu (Google) <mhiramat@kernel.org>
This commit is contained in:
committed by
Masami Hiramatsu (Google)
parent
909bb3a6c5
commit
8f3e79397a
@@ -183,7 +183,7 @@ struct xbc_node * __init xbc_node_get_next(struct xbc_node *node)
|
||||
*/
|
||||
const char * __init xbc_node_get_data(struct xbc_node *node)
|
||||
{
|
||||
int offset = node->data & ~XBC_VALUE;
|
||||
size_t offset = node->data & ~XBC_VALUE;
|
||||
|
||||
if (WARN_ON(offset >= xbc_data_size))
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user