mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
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>
This commit is contained in:
parent
736d1746fb
commit
a7c06cd3a6
1 changed files with 1 additions and 2 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue