]> git.baikalelectronics.ru Git - uboot.git/commit
nvedit: simplify do_env_indirect()
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Mon, 6 Mar 2023 13:27:21 +0000 (14:27 +0100)
committerTom Rini <trini@konsulko.com>
Thu, 30 Mar 2023 19:09:59 +0000 (15:09 -0400)
commit1e15b5cefd50a7e18ae2ddf6d3afd6fa5be5e23a
tree9e8befd859c20dfbf4213249d91879e931c2e9ff
parentbde13f73a7f80068ff0054f3b6711ad7e3571fbb
nvedit: simplify do_env_indirect()

Instead of calling env_get(from) up to three times, just do it once,
computing the value we will put into 'to' and error out if that is
NULL (i.e. no 'from' variable and no default provided).

No functional change.

Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
Reviewed-by: Simon Glass <sjg@chromium.org>
cmd/nvedit.c