summaryrefslogtreecommitdiffstats
path: root/hw
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2012-10-07 17:03:35 +0200
committerGerd Hoffmann <kraxel@redhat.com>2012-10-08 12:15:17 +0200
commitc5825ac6c861bfe1a4adfa27517931b56079e298 (patch)
treee3682211c835fdbd023a8c98f7b5ea3452da830a /hw
parentd96aafca057845a4d58cd7b36771f2c97c78cd56 (diff)
downloadhqemu-c5825ac6c861bfe1a4adfa27517931b56079e298.zip
hqemu-c5825ac6c861bfe1a4adfa27517931b56079e298.tar.gz
hw/qxl: qxl_dirty_surfaces: use uintptr_t
As suggested by Paolo Bonzini, to avoid possible integer overflow issues. Signed-off-by: Alon Levy <alevy@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/qxl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/qxl.c b/hw/qxl.c
index 772b6c0..c246147 100644
--- a/hw/qxl.c
+++ b/hw/qxl.c
@@ -1804,7 +1804,7 @@ static void qxl_hw_text_update(void *opaque, console_ch_t *chardata)
static void qxl_dirty_surfaces(PCIQXLDevice *qxl)
{
- intptr_t vram_start;
+ uintptr_t vram_start;
int i;
if (qxl->mode != QXL_MODE_NATIVE && qxl->mode != QXL_MODE_COMPAT) {
@@ -1815,7 +1815,7 @@ static void qxl_dirty_surfaces(PCIQXLDevice *qxl)
qxl_set_dirty(&qxl->vga.vram, qxl->shadow_rom.draw_area_offset,
qxl->shadow_rom.surface0_area_size);
- vram_start = (intptr_t)memory_region_get_ram_ptr(&qxl->vram_bar);
+ vram_start = (uintptr_t)memory_region_get_ram_ptr(&qxl->vram_bar);
/* dirty the off-screen surfaces */
for (i = 0; i < qxl->ssd.num_surfaces; i++) {
OpenPOWER on IntegriCloud