summaryrefslogtreecommitdiff
path: root/bsd-user
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-08-01 10:13:20 +0000
committerBlue Swirl <blauwirbel@gmail.com>2009-08-01 10:13:20 +0000
commit735d9ec6ea08e1f641ff092d39497449cd01b939 (patch)
treeaffaa99c83934efb6c95255ee6bf36973f5be860 /bsd-user
parent5bc66fd30d90a2eabc04a9b627bde9382edd99d8 (diff)
downloadqemu-735d9ec6ea08e1f641ff092d39497449cd01b939.tar.gz
qemu-735d9ec6ea08e1f641ff092d39497449cd01b939.tar.bz2
qemu-735d9ec6ea08e1f641ff092d39497449cd01b939.zip
More NULL pointer fixes
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'bsd-user')
-rw-r--r--bsd-user/bsdload.c2
-rw-r--r--bsd-user/elfload.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/bsd-user/bsdload.c b/bsd-user/bsdload.c
index 05fd20acd1..14a93bf39b 100644
--- a/bsd-user/bsdload.c
+++ b/bsd-user/bsdload.c
@@ -163,7 +163,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;
diff --git a/bsd-user/elfload.c b/bsd-user/elfload.c
index ed25e8519e..678f3e6ad9 100644
--- a/bsd-user/elfload.c
+++ b/bsd-user/elfload.c
@@ -1014,7 +1014,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;
}