malloc: size is unsigned, don't test for size < 0

clang complains

Change-Id: Ifadf73cf377c0d1808e20731803e01101bad7e1d
Signed-off-by: Patrick Georgi <patrick@georgi-clan.de>
Reviewed-on: http://review.coreboot.org/780
Tested-by: build bot (Jenkins)
Reviewed-by: Mathias Krause <minipli@googlemail.com>
This commit is contained in:
Patrick Georgi 2012-03-11 19:30:36 +01:00 committed by Mathias Krause
parent 0c245370a1
commit fb5026c406
1 changed files with 0 additions and 4 deletions

View File

@ -17,10 +17,6 @@ void *malloc(size_t size)
MALLOCDBG("%s Enter, size %ld, free_mem_ptr %p\n", __func__, size, free_mem_ptr); MALLOCDBG("%s Enter, size %ld, free_mem_ptr %p\n", __func__, size, free_mem_ptr);
/* Checking arguments */
if (size < 0)
die("Error! malloc: size < 0");
/* Overzealous linker check */ /* Overzealous linker check */
if (free_mem_ptr <= 0) if (free_mem_ptr <= 0)
die("Error! malloc: Free_mem_ptr <= 0"); die("Error! malloc: Free_mem_ptr <= 0");