From 44a91cae103d8c6f76236da1531aa0e65b858f38 Mon Sep 17 00:00:00 2001 From: bellard Date: Sun, 18 Jan 2004 22:05:44 +0000 Subject: suppressed cast to lvalue git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@559 c046a42c-6fe2-441c-8c8c-71466251a162 --- linux-user/elfload.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'linux-user') diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 9999268eaa..f2970f88df 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -386,10 +386,12 @@ static unsigned long copy_strings(int argc,char ** argv,unsigned long *page, --p; --tmp; --len; if (--offset < 0) { offset = p % TARGET_PAGE_SIZE; - if (!(pag = (char *) page[p/TARGET_PAGE_SIZE]) && - !(pag = (char *) page[p/TARGET_PAGE_SIZE] = - (unsigned long *) get_free_page())) { - return 0; + pag = (char *) page[p/TARGET_PAGE_SIZE]; + if (!pag) { + pag = (char *)get_free_page(); + page[p/TARGET_PAGE_SIZE] = (unsigned long)pag; + if (!pag) + return 0; } } if (len == 0 || offset == 0) { -- cgit v1.2.3