mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-19 03:15:00 +00:00
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>
This commit is contained in:
parent
752321b625
commit
0395d75d6b
1 changed files with 1 additions and 1 deletions
|
@ -309,10 +309,10 @@ static int setexpr_test_str(struct unit_test_state *uts)
|
||||||
*/
|
*/
|
||||||
ut_assertok(env_set("fred", "x"));
|
ut_assertok(env_set("fred", "x"));
|
||||||
start_mem = ut_check_free();
|
start_mem = ut_check_free();
|
||||||
strcpy(buf, "hello");
|
|
||||||
ut_asserteq(1, run_command("setexpr.s fred 0", 0));
|
ut_asserteq(1, run_command("setexpr.s fred 0", 0));
|
||||||
ut_assertok(ut_check_delta(start_mem));
|
ut_assertok(ut_check_delta(start_mem));
|
||||||
|
|
||||||
|
strcpy(buf, "hello");
|
||||||
ut_assertok(env_set("fred", "12345"));
|
ut_assertok(env_set("fred", "12345"));
|
||||||
start_mem = ut_check_free();
|
start_mem = ut_check_free();
|
||||||
ut_assertok(run_command("setexpr.s fred *0", 0));
|
ut_assertok(run_command("setexpr.s fred *0", 0));
|
||||||
|
|
Loading…
Add table
Reference in a new issue