Skip to content
Snippets Groups Projects
Commit bcdfb8d5 authored by Simon Glass's avatar Simon Glass Committed by Tom Rini
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
parent 91d3aa05
No related branches found
No related tags found
No related merge requests found
...@@ -41,7 +41,15 @@ static uchar env_get_char_init(int index) ...@@ -41,7 +41,15 @@ static uchar env_get_char_init(int index)
return default_environment[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); return *env_get_addr(index);
} }
...@@ -55,14 +63,6 @@ uchar env_get_char(int index) ...@@ -55,14 +63,6 @@ uchar env_get_char(int index)
return env_get_char_init(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 * Read an environment variable as a boolean
* Return -1 if variable does not exist (default to true) * Return -1 if variable does not exist (default to true)
......
...@@ -202,10 +202,6 @@ extern struct hsearch_data env_htab; ...@@ -202,10 +202,6 @@ extern struct hsearch_data env_htab;
/* Function that returns a character from the environment */ /* Function that returns a character from the environment */
unsigned char env_get_char(int); unsigned char env_get_char(int);
/* Function that returns a pointer to a value from the environment */
const unsigned char *env_get_addr(int);
unsigned char env_get_char_memory(int index);
/* Function that updates CRC of the enironment */ /* Function that updates CRC of the enironment */
void env_crc_update(void); void env_crc_update(void);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment