Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

zuoqilin and committed by
Steven Rostedt (VMware)
30d103f2 3e08a9f9

+1 -3
+1 -3
tools/bootconfig/main.c
··· 84 84 char key[XBC_KEYLEN_MAX]; 85 85 struct xbc_node *leaf; 86 86 const char *val; 87 - int ret = 0; 88 87 89 88 xbc_for_each_key_value(leaf, val) { 90 - ret = xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX); 91 - if (ret < 0) 89 + if (xbc_node_compose_key(leaf, key, XBC_KEYLEN_MAX) < 0) 92 90 break; 93 91 printf("%s = ", key); 94 92 if (!val || val[0] == '\0') {