Patchwork [23/26] hpet: it is imposible that qemu_timer field is NULL at this point

login
register
mail settings
Submitter Juan Quintela
Date Sept. 10, 2009, 1:04 a.m.
Message ID <3294cfd8d3af13dc0410927fd6fb8ce11479adbf.1252543872.git.quintela@redhat.com>
Download mbox | patch
Permalink /patch/33261/
State Superseded
Headers show

Comments

Juan Quintela - Sept. 10, 2009, 1:04 a.m.
Signed-off-by: Juan Quintela <quintela@redhat.com>
---
 hw/hpet.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

Patch

diff --git a/hw/hpet.c b/hw/hpet.c
index 20df7ef..98a769e 100644
--- a/hw/hpet.c
+++ b/hw/hpet.c
@@ -174,9 +174,7 @@  static void hpet_save(QEMUFile *f, void *opaque)
         qemu_put_be64s(f, &s->timer[i].fsb);
         qemu_put_be64s(f, &s->timer[i].period);
         qemu_put_8s(f, &s->timer[i].wrap_flag);
-        if (s->timer[i].qemu_timer) {
-            qemu_put_timer(f, s->timer[i].qemu_timer);
-        }
+        qemu_put_timer(f, s->timer[i].qemu_timer);
     }
 }

@@ -201,9 +199,7 @@  static int hpet_load(QEMUFile *f, void *opaque, int version_id)
         qemu_get_be64s(f, &s->timer[i].fsb);
         qemu_get_be64s(f, &s->timer[i].period);
         qemu_get_8s(f, &s->timer[i].wrap_flag);
-        if (s->timer[i].qemu_timer) {
-            qemu_get_timer(f, s->timer[i].qemu_timer);
-        }
+        qemu_get_timer(f, s->timer[i].qemu_timer);
     }
     return 0;
 }