summaryrefslogtreecommitdiffstats
path: root/linux-user
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-18 22:05:44 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2004-01-18 22:05:44 +0000
commit44a91cae103d8c6f76236da1531aa0e65b858f38 (patch)
tree0460250049991f332c9d0a4f0a6912725cca700d /linux-user
parentd575b78aabd7579959cc089cc993960709b5bb33 (diff)
downloadhqemu-44a91cae103d8c6f76236da1531aa0e65b858f38.zip
hqemu-44a91cae103d8c6f76236da1531aa0e65b858f38.tar.gz
suppressed cast to lvalue
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@559 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r--linux-user/elfload.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 9999268..f2970f8 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) {
OpenPOWER on IntegriCloud