Commit 30d103f2 authored by zuoqilin's avatar zuoqilin Committed by Steven Rostedt (VMware)

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.comAcked-by: default avatarMasami Hiramatsu <mhiramat@kernel.org>
Signed-off-by: default avatarzuoqilin <zuoqilin@yulong.com>
Signed-off-by: default avatarSteven Rostedt (VMware) <rostedt@goodmis.org>
parent 3e08a9f9
...@@ -84,11 +84,9 @@ static void xbc_show_list(void) ...@@ -84,11 +84,9 @@ static void xbc_show_list(void)
char key[XBC_KEYLEN_MAX]; char key[XBC_KEYLEN_MAX];
struct xbc_node *leaf; struct xbc_node *leaf;
const char *val; const char *val;
int ret = 0;
xbc_for_each_key_value(leaf, val) { xbc_for_each_key_value(leaf, val) {
ret = xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX); if (xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX) < 0)
if (ret < 0)
break; break;
printf("%s = ", key); printf("%s = ", key);
if (!val || val[0] == '\0') { if (!val || val[0] == '\0') {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment