bootconfig: remove redundant assignment in xbc_parse_array()
Subsystems (3)
PATCH 1/1 bootconfig: remove redundant assignment in xbc_parse_array()
After the loop, node is the last array value that xbc_add_child() added, and xbc_parse_array() sets node->child to 0.
xbc_init_node() already set node->child to 0 when the value was added, and node->child is not modified after that, so the assignment is redundant.
So remove the assignment.
No functional change.
--- lib/bootconfig.c | 1 - 1 file changed, 1 deletion(-)
lib/bootconfig.c +0 -1
@@ -833,7 +833,6 @@ static int __init xbc_parse_array(char **__v)return -ENOMEM ; *__v = next; }while (c ==',' ); - node->child =0 ;return c; }
base-commit: 13e8b7707efcea3a401d242958ba0a392f227847
Signature · 1 line
2.43.0
Masami Hiramatsu (Google)
maintainerQuoted 11 lines · On Fri, 11 Sep 2026 01:30:48 +0900 Sang-Heon Jeon <[email protected]> wrote:
After the loop, node is the last array value that
xbc_add_child()added, andxbc_parse_array()setsnode->childto 0.
xbc_init_node()already setnode->childto 0 when the value was added, andnode->childis not modified after that, so the assignment is redundant.So remove the assignment.
No functional change.
Looks good to me. It seems commit ca24306d83a1 ("bootconfig: Change array value to use child node") has replaced next to child by mistake.
Thank you!
Quoted 22 lines
Signed-off-by Sang-Heon Jeon <[email protected]>--- lib/bootconfig.c | 1 - 1 file changed, 1 deletion(-)lib/bootconfig.c +0
-1@@ -833,7 +833,6 @@ static int __init xbc_parse_array(char **__v)return -ENOMEM ; *__v = next; }while (c ==',' ); - node->child =0 ;return c; }base-commit:
13e8b7707efcea3a401d242958ba0a392f227847Signature · 1 line
2.43.0
Signature · 1 line
Masami Hiramatsu (Google) <[email protected]>