Commit 44a91cae103d8c6f76236da1531aa0e65b858f38

Authored by bellard
1 parent d575b78a

suppressed cast to lvalue


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@559 c046a42c-6fe2-441c-8c8c-71466251a162
Showing 1 changed file with 6 additions and 4 deletions
linux-user/elfload.c
... ... @@ -386,10 +386,12 @@ static unsigned long copy_strings(int argc,char ** argv,unsigned long *page,
386 386 --p; --tmp; --len;
387 387 if (--offset < 0) {
388 388 offset = p % TARGET_PAGE_SIZE;
389   - if (!(pag = (char *) page[p/TARGET_PAGE_SIZE]) &&
390   - !(pag = (char *) page[p/TARGET_PAGE_SIZE] =
391   - (unsigned long *) get_free_page())) {
392   - return 0;
  389 + pag = (char *) page[p/TARGET_PAGE_SIZE];
  390 + if (!pag) {
  391 + pag = (char *)get_free_page();
  392 + page[p/TARGET_PAGE_SIZE] = (unsigned long)pag;
  393 + if (!pag)
  394 + return 0;
393 395 }
394 396 }
395 397 if (len == 0 || offset == 0) {
... ...