[PATCH] nvedit: simplify do_env_indirect()

Simon Glass sjg at chromium.org
Mon Mar 6 18:53:12 CET 2023


On Mon, 6 Mar 2023 at 06:27, Rasmus Villemoes
<rasmus.villemoes at prevas.dk> wrote:
>
> 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 at prevas.dk>
> ---
>  cmd/nvedit.c | 11 ++++-------
>  1 file changed, 4 insertions(+), 7 deletions(-)

Reviewed-by: Simon Glass <sjg at chromium.org>


More information about the U-Boot mailing list