From: Heinrich Schuchardt Date: Mon, 3 Feb 2025 15:10:26 +0000 (+0100) Subject: test: clean up setexpr_test_str() X-Git-Tag: v2025.04-rc2~19^2~3 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0395d75d6b867a3c109e5a71c3773f8415bf5121;p=pandora-u-boot.git test: clean up setexpr_test_str() Assign variable buf in the sub-test where it is used. Signed-off-by: Heinrich Schuchardt --- diff --git a/test/cmd/setexpr.c b/test/cmd/setexpr.c index 7f318a42ead..cc2003faab5 100644 --- a/test/cmd/setexpr.c +++ b/test/cmd/setexpr.c @@ -309,10 +309,10 @@ static int setexpr_test_str(struct unit_test_state *uts) */ ut_assertok(env_set("fred", "x")); start_mem = ut_check_free(); - strcpy(buf, "hello"); ut_asserteq(1, run_command("setexpr.s fred 0", 0)); ut_assertok(ut_check_delta(start_mem)); + strcpy(buf, "hello"); ut_assertok(env_set("fred", "12345")); start_mem = ut_check_free(); ut_assertok(run_command("setexpr.s fred *0", 0));