aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2025-02-03 16:10:26 +0100
committerTom Rini <trini@konsulko.com>2025-02-07 13:35:23 -0600
commit0395d75d6b867a3c109e5a71c3773f8415bf5121 (patch)
tree46b323fd0ade8fb42d8f28024c7b2048b7949241 /test
parent752321b62530dcbd6e8b5872aff4cf761809d76b (diff)
downloadu-boot-0395d75d6b867a3c109e5a71c3773f8415bf5121.tar.gz
test: clean up setexpr_test_str()
Assign variable buf in the sub-test where it is used. Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Diffstat (limited to 'test')
-rw-r--r--test/cmd/setexpr.c2
1 files changed, 1 insertions, 1 deletions
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));