From fb5026c40607eb9aa8927c8eeace75d1e32797fc Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sun, 11 Mar 2012 19:30:36 +0100 Subject: [PATCH] malloc: size is unsigned, don't test for size < 0 clang complains Change-Id: Ifadf73cf377c0d1808e20731803e01101bad7e1d Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/780 Tested-by: build bot (Jenkins) Reviewed-by: Mathias Krause --- src/lib/malloc.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/lib/malloc.c b/src/lib/malloc.c index 3cedc8f82f..c10750d5e9 100644 --- a/src/lib/malloc.c +++ b/src/lib/malloc.c @@ -17,10 +17,6 @@ void *malloc(size_t size) 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 */ if (free_mem_ptr <= 0) die("Error! malloc: Free_mem_ptr <= 0");