This function is not used anywhere other than env_get_char(). Move the
code into that function.

Reviewed-by: Tom Rini <tr...@konsulko.com>
Signed-off-by: Simon Glass <s...@chromium.org>
---

Changes in v4: None
Changes in v3: None
Changes in v2: None

 env/common.c | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/env/common.c b/env/common.c
index 5a17e52615..2e94dd71e2 100644
--- a/env/common.c
+++ b/env/common.c
@@ -41,17 +41,12 @@ static uchar env_get_char_init(int index)
                return default_environment[index];
 }
 
-static const uchar *env_get_addr(int index)
+static uchar env_get_char_memory(int index)
 {
        if (gd->env_valid)
-               return (uchar *)(gd->env_addr + index);
+               return *(uchar *)(gd->env_addr + index);
        else
-               return &default_environment[index];
-}
-
-static uchar env_get_char_memory(int index)
-{
-       return *env_get_addr(index);
+               return default_environment[index];
 }
 
 uchar env_get_char(int index)
-- 
2.14.0.rc0.400.g1c36432dff-goog

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to