I can't see any obvious needs for the default environment to be writable,
so make it const.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
#define XMK_STR(x) #x
#define MK_STR(x) XMK_STR(x)
-uchar default_environment[] = {
+const uchar default_environment[] = {
#ifdef CONFIG_BOOTARGS
"bootargs=" CONFIG_BOOTARGS "\0"
#endif
return (c);
}
-uchar *env_get_addr (int index)
+const uchar *env_get_addr (int index)
{
if (gd->env_valid)
return (uchar *)(gd->env_addr + index);
static ulong end_addr_new = CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SECT_SIZE - 1;
#endif /* CONFIG_ENV_ADDR_REDUND */
-extern uchar default_environment[];
+extern const uchar default_environment[];
uchar env_get_char_spec(int index)
unsigned char env_get_char (int);
/* Function that returns a pointer to a value from the environment */
-unsigned char *env_get_addr(int);
+const unsigned char *env_get_addr(int);
unsigned char env_get_char_memory (int index);
/* Function that updates CRC of the enironment */