diff options
author | Tom Rini <trini@ti.com> | 2012-09-13 10:34:24 -0700 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2012-09-13 10:34:24 -0700 |
commit | f71d5cd56bee6e730fe46f5f2024f1b5106ab944 (patch) | |
tree | 09b0fd7c134094a496294cb12c8f073416def178 /common | |
parent | b89598a1480e015844bd0558c7bdd49ce551a0c3 (diff) | |
parent | a420dfe2b017db321ad9b4058d38e216b756465f (diff) | |
download | u-boot-imx-f71d5cd56bee6e730fe46f5f2024f1b5106ab944.zip u-boot-imx-f71d5cd56bee6e730fe46f5f2024f1b5106ab944.tar.gz u-boot-imx-f71d5cd56bee6e730fe46f5f2024f1b5106ab944.tar.bz2 |
Merge branch 'master' of git://git.denx.de/u-boot-avr32
Diffstat (limited to 'common')
-rw-r--r-- | common/dlmalloc.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/common/dlmalloc.c b/common/dlmalloc.c index c645d73..1d7e527 100644 --- a/common/dlmalloc.c +++ b/common/dlmalloc.c @@ -1487,11 +1487,11 @@ static mbinptr av_[NAV * 2 + 2] = { #ifdef CONFIG_NEEDS_MANUAL_RELOC void malloc_bin_reloc (void) { - unsigned long *p = (unsigned long *)(&av_[2]); - int i; - for (i=2; i<(sizeof(av_)/sizeof(mbinptr)); ++i) { - *p++ += gd->reloc_off; - } + mbinptr *p = &av_[2]; + size_t i; + + for (i = 2; i < ARRAY_SIZE(av_); ++i, ++p) + *p = (mbinptr)((ulong)*p + gd->reloc_off); } #endif |