summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTom Rini <trini@ti.com>2012-09-13 10:34:24 -0700
committerTom Rini <trini@ti.com>2012-09-13 10:34:24 -0700
commitf71d5cd56bee6e730fe46f5f2024f1b5106ab944 (patch)
tree09b0fd7c134094a496294cb12c8f073416def178 /common
parentb89598a1480e015844bd0558c7bdd49ce551a0c3 (diff)
parenta420dfe2b017db321ad9b4058d38e216b756465f (diff)
downloadu-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.c10
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