From: Peter Crosthwaite Date: Tue, 26 Aug 2014 03:09:13 +0000 (-0700) Subject: xen-hvm: Constify string X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=dc6c4fe8378b2e94bcf2ee2efa62ed0aba9aa5cc;p=qemu.git xen-hvm: Constify string It's constant, and sourced from existing const strings. Avoid dodgy casts by converting to const. Signed-off-by: Peter Crosthwaite Reviewed-by: Stefan Weil Signed-off-by: Paolo Bonzini --- diff --git a/xen-hvm.c b/xen-hvm.c index 91de2e230b..d763e86f24 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);