summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>2016-02-15 15:30:25 +0100
committerTimothy Pearson <tpearson@raptorengineering.com>2019-11-29 19:49:36 -0600
commit10061cd381e5c2575dbfaab45f63a9bc8d5212b3 (patch)
tree421579cfe7dbf755644ebaa094551dd74f576bd0
parenta9f0df2b1f4e93ee1a06c13bb36cbc9b17369e31 (diff)
downloadhqemu-10061cd381e5c2575dbfaab45f63a9bc8d5212b3.zip
hqemu-10061cd381e5c2575dbfaab45f63a9bc8d5212b3.tar.gz
pc-bios/s390-ccw: fix old bug in ptr increment
We need to increment by the size of the structure, whereas 'ns' is 'uint8_t *'. Acked-by: Christian Borntraeger <borntraeger@de.ibm.com> Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
-rw-r--r--pc-bios/s390-ccw/bootmap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pc-bios/s390-ccw/bootmap.c b/pc-bios/s390-ccw/bootmap.c
index 415508b..4925302 100644
--- a/pc-bios/s390-ccw/bootmap.c
+++ b/pc-bios/s390-ccw/bootmap.c
@@ -424,7 +424,7 @@ static void ipl_scsi(void)
IPL_assert(magic_match(sec, ZIPL_MAGIC), "No zIPL magic");
ns_end = sec + virtio_get_block_size();
- for (ns = (sec + pte_len); (ns + pte_len) < ns_end; ns++) {
+ for (ns = (sec + pte_len); (ns + pte_len) < ns_end; ns += pte_len) {
prog_table_entry = (ScsiBlockPtr *)ns;
if (!prog_table_entry->blockno) {
break;
OpenPOWER on IntegriCloud