QemuOpts: cleanup tmp 'allocated' member from QemuOptsList

Now only qemu_opts_append uses 'allocated' to indicate free memory.
For this function only, we can also let result list's (const char *)
members point to input list's members, only if the input list has
longer lifetime than result list. In current code, that is true.
So, we can remove the 'allocated' member from QemuOptsList definition
to keep code clean.

Signed-off-by: Chunyan Liu <cyliu@suse.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
This commit is contained in:
Chunyan Liu 2014-06-05 17:21:12 +08:00 committed by Stefan Hajnoczi
parent c282e1fdf7
commit 98d896d978
2 changed files with 3 additions and 30 deletions

View file

@ -63,12 +63,6 @@ typedef struct QemuOptDesc {
} QemuOptDesc;
struct QemuOptsList {
/* FIXME: Temp used for QEMUOptionParamter->QemuOpts conversion to
* indicate the need to free memory. Will remove after all drivers
* switch to QemuOpts.
*/
bool allocated;
const char *name;
const char *implied_opt_name;
bool merge_lists; /* Merge multiple uses of option into a single list? */