qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 6/8] xen-hvm: Constify string


From: Paolo Bonzini
Subject: [Qemu-devel] [PULL 6/8] xen-hvm: Constify string
Date: Thu, 28 Aug 2014 16:13:23 +0200

From: Peter Crosthwaite <address@hidden>

It's constant, and sourced from existing const strings. Avoid dodgy
casts by converting to const.

Signed-off-by: Peter Crosthwaite <address@hidden>
Reviewed-by: Stefan Weil <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
 xen-hvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen-hvm.c b/xen-hvm.c
index 91de2e2..d763e86 100644
--- 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);
-- 
1.8.3.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]