From dc8622f2bf9174cd42932ad86bcc98c6f7c98832 Mon Sep 17 00:00:00 2001 From: Chunyan Liu Date: Thu, 5 Jun 2014 17:20:44 +0800 Subject: QemuOpts: change opt->name|str from (const char *) to (char *) qemu_opt_del() already assumes that all QemuOpt instances contain malloc'd name and value; but it had to cast away const because opts_start_struct() was doing its own thing and using static storage instead. By using the correct type and malloced strings everywhere, the usage of this struct becomes clearer. Reviewed-by: Eric Blake Reviewed-by: Leandro Dorileo Signed-off-by: Chunyan Liu Signed-off-by: Stefan Hajnoczi --- include/qemu/option_int.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'include/qemu') diff --git a/include/qemu/option_int.h b/include/qemu/option_int.h index 8212fa4a48..6432c1a8c9 100644 --- a/include/qemu/option_int.h +++ b/include/qemu/option_int.h @@ -30,8 +30,8 @@ #include "qemu/error-report.h" struct QemuOpt { - const char *name; - const char *str; + char *name; + char *str; const QemuOptDesc *desc; union { -- cgit v1.2.3-55-g7522