aboutsummaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorKevin Smith <kevin.smith@elecsyscorp.com>2015-10-23 17:51:47 +0000
committerHeiko Schocher <hs@denx.de>2015-11-19 07:32:49 +0100
commita7c06cd3a6c2c889bd115f43f3de0c9fcc066f96 (patch)
tree111e7bcf1d9dd04bf34beee4c8b15dfb53a33773 /common
parent736d1746fb7b8f7cd70657a4a72db2b6bd8de40e (diff)
downloadu-boot-a7c06cd3a6c2c889bd115f43f3de0c9fcc066f96.zip
u-boot-a7c06cd3a6c2c889bd115f43f3de0c9fcc066f96.tar.gz
u-boot-a7c06cd3a6c2c889bd115f43f3de0c9fcc066f96.tar.bz2
env_ubi.c: Correct pointer error in env load
The variable "buf" in this function is a char array, and the function ubi_volume_read is expecting a char *. In the call, the address of the pointer is being taken, incorrectly passing a char **. The compiler warning was being silenced by the cast. Remove the address operator and the cast. Signed-off-by: Kevin Smith <kevin.smith@elecsyscorp.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Cc: Tom Rini <trini@konsulko.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'common')
-rw-r--r--common/env_ubi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/common/env_ubi.c b/common/env_ubi.c
index e0dc5af..e611199 100644
--- a/common/env_ubi.c
+++ b/common/env_ubi.c
@@ -181,8 +181,7 @@ void env_relocate_spec(void)
return;
}
- if (ubi_volume_read(CONFIG_ENV_UBI_VOLUME, (void *)&buf,
- CONFIG_ENV_SIZE)) {
+ if (ubi_volume_read(CONFIG_ENV_UBI_VOLUME, buf, CONFIG_ENV_SIZE)) {
printf("\n** Unable to read env from %s:%s **\n",
CONFIG_ENV_UBI_PART, CONFIG_ENV_UBI_VOLUME);
set_default_env(NULL);