]> git.proxmox.com Git - qemu.git/blobdiff - linux-user/flatload.c
Merge remote-tracking branch 'qemu-kvm/uq/master' into stable-1.5
[qemu.git] / linux-user / flatload.c
index 1062da3852106effbb6c6a259429b39c6e0b0e3a..58f679e07282acacde4c9ec20eec6c56d79e2b1b 100644 (file)
@@ -575,7 +575,7 @@ static int load_flat_file(struct linux_binprm * bprm,
      * help simplify all this mumbo jumbo
      *
      * We've got two different sections of relocation entries.
-     * The first is the GOT which resides at the begining of the data segment
+     * The first is the GOT which resides at the beginning of the data segment
      * and is terminated with a -1.  This one can be relocated in place.
      * The second is the extra relocation entries tacked after the image's
      * data segment. These require a little more processing as the entry is
@@ -660,7 +660,7 @@ static int load_flat_file(struct linux_binprm * bprm,
     }
 
     /* zero the BSS.  */
-    memset((void *)((unsigned long)datapos + data_len), 0, bss_len);
+    memset(g2h(datapos + data_len), 0, bss_len);
 
     return 0;
 }