common: Drop init.h from common header
[oweals/u-boot.git] / cmd / setexpr.c
index 91a5a9a770b47184282c8d231442f7ebbb707d4b..0182f1993846cdb4f6d027c6ddf7e6707d7b2d99 100644 (file)
@@ -1,8 +1,7 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2008 Freescale Semiconductor, Inc.
  * Copyright 2013 Wolfgang Denk <wd@denx.de>
- *
- * SPDX-License-Identifier:    GPL-2.0+
  */
 
 /*
@@ -12,6 +11,7 @@
 #include <common.h>
 #include <config.h>
 #include <command.h>
+#include <env.h>
 #include <mapmem.h>
 
 static ulong get_arg(char *s, int w)
@@ -145,7 +145,7 @@ static int regex_sub(const char *name,
        }
 
        if (t == NULL) {
-               value = getenv(name);
+               value = env_get(name);
 
                if (value == NULL) {
                        printf("## Error: variable \"%s\" not defined\n", name);