mirror of
https://github.com/mii443/qemu.git
synced 2025-12-05 12:08:28 +00:00
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>
This commit is contained in:
committed by
Stefan Hajnoczi
parent
e36af94f86
commit
dc8622f2bf
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user