summary refs log tree commit diff stats
path: root/include/qemu/option_int.h
diff options
context:
space:
mode:
authorChunyan Liu <cyliu@suse.com>2014-06-05 17:20:44 +0800
committerStefan Hajnoczi <stefanha@redhat.com>2014-06-16 17:23:20 +0800
commitdc8622f2bf9174cd42932ad86bcc98c6f7c98832 (patch)
tree14e4d35b5b4bd428a0c0206d8200c31314f5fe7e /include/qemu/option_int.h
parente36af94f868fe5b897c4903126e11fdf25fa4739 (diff)
downloadfocaccia-qemu-dc8622f2bf9174cd42932ad86bcc98c6f7c98832.tar.gz
focaccia-qemu-dc8622f2bf9174cd42932ad86bcc98c6f7c98832.zip
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 <eblake@redhat.com>
Reviewed-by: Leandro Dorileo <l@dorileo.org>
Signed-off-by: Chunyan Liu <cyliu@suse.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'include/qemu/option_int.h')
-rw-r--r--include/qemu/option_int.h4
1 files changed, 2 insertions, 2 deletions
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 {