summaryrefslogtreecommitdiff
path: root/tools/bootconfig
diff options
context:
space:
mode:
authorzuoqilin <zuoqilin@yulong.com>2021-04-14 21:46:47 +0800
committerSteven Rostedt (VMware) <rostedt@goodmis.org>2021-06-10 11:16:20 -0400
commit30d103f2d4602da07313cf43d7b746e89d7d9c1d (patch)
tree3f430934a83c1c353ef9c54edfb52e8834eb303d /tools/bootconfig
parent3e08a9f9760f4a70d633c328a76408e62d6f80a3 (diff)
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>
Diffstat (limited to 'tools/bootconfig')
-rw-r--r--tools/bootconfig/main.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/tools/bootconfig/main.c b/tools/bootconfig/main.c
index 6cd6080cac04..268b72f4cc92 100644
--- a/tools/bootconfig/main.c
+++ b/tools/bootconfig/main.c
@@ -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') {