[PATCH 2/2] test: cmd: fdt: Drop new unneeded curly brackets

Marek Vasut marek.vasut+renesas at mailbox.org
Thu Mar 2 04:05:24 CET 2023


Drop no longer needed { } around ut_assert*() functions in FDT test.
No functional change.

Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
Cc: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
Cc: Simon Glass <sjg at chromium.org>
Cc: Tom Rini <trini at konsulko.com>
---
 test/cmd/fdt.c | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c
index 79ec45bbc2a..e1a07ceb67f 100644
--- a/test/cmd/fdt.c
+++ b/test/cmd/fdt.c
@@ -796,23 +796,21 @@ static int fdt_test_set_single(struct unit_test_state *uts,
 	 * => fdt set /path property
 	 */
 	ut_assertok(console_record_reset_enable());
-	if (sval) {
+	if (sval)
 		ut_assertok(run_commandf("fdt set %s %s %s", path, prop, sval));
-	} else if (integer) {
+	else if (integer)
 		ut_assertok(run_commandf("fdt set %s %s <%d>", path, prop, ival));
-	} else {
+	else
 		ut_assertok(run_commandf("fdt set %s %s", path, prop));
-	}
 
 	/* Validate the property is present and has correct value. */
 	ut_assertok(run_commandf("fdt get value svar %s %s", path, prop));
-	if (sval) {
+	if (sval)
 		ut_asserteq_str(sval, env_get("svar"));
-	} else if (integer) {
+	else if (integer)
 		ut_asserteq(ival, env_get_hex("svar", 0x1234));
-	} else {
+	else
 		ut_assertnull(env_get("svar"));
-	}
 	ut_assertok(ut_check_console_end(uts));
 
 	return 0;
-- 
2.39.2



More information about the U-Boot mailing list