summaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2017-08-03 12:21:51 -0600
committerTom Rini <trini@konsulko.com>2017-08-15 08:18:46 -0400
commitbcdfb8d5a531fbc65dceb60b4205f5a0fbd49a97 (patch)
tree7b7ff9de4db88ac70ee0654c3eba6de6d038602a /env
parent91d3aa05d0bb05aa712bda3d2a2b3957a4b551fe (diff)
env: common: Make env_get_addr/get_char_memory() static
These functions are not used outside this file. Make them static and order them to avoid forward declarations. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'env')
-rw-r--r--env/common.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/env/common.c b/env/common.c
index d9c0c4e3f34..5a17e526154 100644
--- a/env/common.c
+++ b/env/common.c
@@ -41,7 +41,15 @@ static uchar env_get_char_init(int index)
return default_environment[index];
}
-uchar env_get_char_memory(int index)
+static const uchar *env_get_addr(int index)
+{
+ if (gd->env_valid)
+ return (uchar *)(gd->env_addr + index);
+ else
+ return &default_environment[index];
+}
+
+static uchar env_get_char_memory(int index)
{
return *env_get_addr(index);
}
@@ -55,14 +63,6 @@ uchar env_get_char(int index)
return env_get_char_init(index);
}
-const uchar *env_get_addr(int index)
-{
- if (gd->env_valid)
- return (uchar *)(gd->env_addr + index);
- else
- return &default_environment[index];
-}
-
/*
* Read an environment variable as a boolean
* Return -1 if variable does not exist (default to true)