mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 15:53:54 -06:00
More NULL pointer fixes
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
This commit is contained in:
parent
660f11be54
commit
7cba04f6de
7 changed files with 13 additions and 11 deletions
|
@ -1220,7 +1220,7 @@ static const char *lookup_symbolxx(struct syminfo *s, target_ulong orig_addr)
|
|||
key.st_value = orig_addr;
|
||||
|
||||
sym = bsearch(&key, syms, s->disas_num_syms, sizeof(*syms), symfind);
|
||||
if (sym != 0) {
|
||||
if (sym != NULL) {
|
||||
return s->disas_strtab + sym->st_name;
|
||||
}
|
||||
|
||||
|
|
|
@ -165,7 +165,7 @@ int loader_exec(const char * filename, char ** argv, char ** envp,
|
|||
|
||||
bprm->p = TARGET_PAGE_SIZE*MAX_ARG_PAGES-sizeof(unsigned int);
|
||||
for (i=0 ; i<MAX_ARG_PAGES ; i++) /* clear page-table */
|
||||
bprm->page[i] = 0;
|
||||
bprm->page[i] = NULL;
|
||||
retval = open(filename, O_RDONLY);
|
||||
if (retval < 0)
|
||||
return retval;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue