diff options
author | Simon Glass <sjg@chromium.org> | 2017-08-03 12:21:52 -0600 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-08-15 08:18:46 -0400 |
commit | 0219fb61c1378152b11f0e21e1e4db89081f15da (patch) | |
tree | 23df210ad00fc727a86dcc20f02cafa3129bdd8e /env/common.c | |
parent | bcdfb8d5a531fbc65dceb60b4205f5a0fbd49a97 (diff) | |
download | u-boot-0219fb61c1378152b11f0e21e1e4db89081f15da.tar.gz u-boot-0219fb61c1378152b11f0e21e1e4db89081f15da.tar.bz2 u-boot-0219fb61c1378152b11f0e21e1e4db89081f15da.zip |
env: common: Drop env_get_addr()
This function is not used anywhere other than env_get_char(). Move the
code into that function.
Reviewed-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'env/common.c')
-rw-r--r-- | env/common.c | 11 |
1 files 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) |