]> git.proxmox.com Git - mirror_qemu.git/commit - util/qemu-option.c
QemuOpts: cleanup tmp 'allocated' member from QemuOptsList
authorChunyan Liu <cyliu@suse.com>
Thu, 5 Jun 2014 09:21:12 +0000 (17:21 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 16 Jun 2014 09:23:21 +0000 (17:23 +0800)
commit98d896d978eef0fd6ff8d93a1ccea34e00b97f8c
tree1c2a049cb1aebe3fe24aec7494dde091351aac6d
parentc282e1fdf7ec9659c7f320123be397477a359d01
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>
include/qemu/option.h
util/qemu-option.c