mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-12-29 17:25:38 +00:00
tools/bootconfig: Simplify expression
It is not necessary to define the variable ret to receive the return value of the xbc_node_compose_key() method. Link: https://lkml.kernel.org/r/20210414134647.1870-1-zuoqilin1@163.com Acked-by: Masami Hiramatsu <mhiramat@kernel.org> Signed-off-by: zuoqilin <zuoqilin@yulong.com> Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
This commit is contained in:
parent
3e08a9f976
commit
30d103f2d4
@ -84,11 +84,9 @@ static void xbc_show_list(void)
|
||||
char key[XBC_KEYLEN_MAX];
|
||||
struct xbc_node *leaf;
|
||||
const char *val;
|
||||
int ret = 0;
|
||||
|
||||
xbc_for_each_key_value(leaf, val) {
|
||||
ret = xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX);
|
||||
if (ret < 0)
|
||||
if (xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX) < 0)
|
||||
break;
|
||||
printf("%s = ", key);
|
||||
if (!val || val[0] == '\0') {
|
||||
|
Loading…
Reference in New Issue
Block a user