Fix most x86 warnings from Sparse

Signed-off-by: Blue Swirl <blauwirbel@gmail.com>

git-svn-id: svn://coreboot.org/openbios/trunk/openbios-devel@534 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2009-08-04 20:37:32 +00:00
parent d4b64752eb
commit 2828b56876
5 changed files with 20 additions and 9 deletions

View File

@@ -30,7 +30,7 @@ static void *calloc(size_t nmemb, size_t size)
if (alloc_size < nmemb || alloc_size < size) {
printk("calloc overflow: %u, %u\n", nmemb, size);
return 0;
return NULL;
}
mem = malloc(alloc_size);
@@ -314,7 +314,7 @@ int elf_load(struct sys_info *info, const char *filename, const char *cmdline)
int retval = -1;
int image_retval;
image_name = image_version = 0;
image_name = image_version = NULL;
if (!file_open(filename))
goto out;