Fix most warnings from Sparse

git-svn-id: svn://coreboot.org/openbios/openbios-devel@274 f158a5a8-5612-0410-a976-696ce0be7e32
This commit is contained in:
Blue Swirl
2008-11-30 11:54:01 +00:00
parent c52d26b976
commit bf0c6b1c38
51 changed files with 186 additions and 166 deletions

View File

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