[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210610010156.806037738@goodmis.org>
Date: Wed, 09 Jun 2021 21:01:31 -0400
From: Steven Rostedt <rostedt@...dmis.org>
To: linux-kernel@...r.kernel.org
Cc: Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Masami Hiramatsu <mhiramat@...nel.org>,
zuoqilin <zuoqilin@...ong.com>
Subject: [for-next][PATCH 01/11] tools/bootconfig: Simplify expression
From: zuoqilin <zuoqilin@...ong.com>
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@...nel.org>
Signed-off-by: zuoqilin <zuoqilin@...ong.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@...dmis.org>
---
tools/bootconfig/main.c | 4 +---
1 file changed, 1 insertion(+), 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') {
--
2.30.2
Powered by blists - more mailing lists