libpayload: Fix malloc allocation
authorJordan Crouse <jordan.crouse@amd.com>
Fri, 25 Apr 2008 23:08:47 +0000 (23:08 +0000)
committerJordan Crouse <jordan.crouse@amd.com>
Fri, 25 Apr 2008 23:08:47 +0000 (23:08 +0000)
commit24a040475918ad2977a52677f59b10f7ce085afc
tree5305fda7cfdfff96c322c715c9c2bb1124b18f97
parentc781584936361a921a9f1f6b0491341aaae5c2b8
libpayload:  Fix malloc allocation

Apparently the previous version worked on luck.  Fix the allocation
and add parens to better guide the compiler.  Also, halt() if
the heap is poisoned (like by an overrun).  Finally, fix calloc()
so that it actually works.

Signed-off-by: Jordan Crouse <jordan.crouse@amd.com>
Acked-by: Peter Stuge <peter@stuge.se>
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@3269 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
payloads/libpayload/libc/malloc.c