mirror of
https://gitlab.com/qemu-project/openbios.git
synced 2024-02-13 08:34:06 +08:00
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user