]> Git Repo - qemu.git/commitdiff
xen-hvm: Constify string
authorPeter Crosthwaite <[email protected]>
Tue, 26 Aug 2014 03:09:13 +0000 (20:09 -0700)
committerPaolo Bonzini <[email protected]>
Thu, 28 Aug 2014 14:09:44 +0000 (16:09 +0200)
It's constant, and sourced from existing const strings. Avoid dodgy
casts by converting to const.

Signed-off-by: Peter Crosthwaite <[email protected]>
Reviewed-by: Stefan Weil <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
xen-hvm.c

index 91de2e230b1f6227a2f95d30e03fb2f861e1ff85..d763e86f241afff7776e57a2770c3fd1c63dd44c 100644 (file)
--- a/xen-hvm.c
+++ b/xen-hvm.c
@@ -71,7 +71,7 @@ static inline ioreq_t *xen_vcpu_ioreq(shared_iopage_t *shared_page, int vcpu)
 typedef struct XenPhysmap {
     hwaddr start_addr;
     ram_addr_t size;
-    char *name;
+    const char *name;
     hwaddr phys_offset;
 
     QLIST_ENTRY(XenPhysmap) list;
@@ -330,7 +330,7 @@ go_physmap:
 
     physmap->start_addr = start_addr;
     physmap->size = size;
-    physmap->name = (char *)mr->name;
+    physmap->name = mr->name;
     physmap->phys_offset = phys_offset;
 
     QLIST_INSERT_HEAD(&state->physmap, physmap, list);
This page took 0.02731 seconds and 4 git commands to generate.