On 08/02/2013 01:34 AM, Markus Armbruster wrote: > Commit 6d4cd40 fixed qemu_opts_set_defaults() for an existing corner > case, but broke it for another one that can't be reached in current > code. >
> > Not reachable, because we never pass lists with !list->merge_lists to > qemu_opts_set_defaults(). > > Guard against possible (if unlikely) future misuse with assert(). > > Reported-by: Peter Maydell <peter.mayd...@linaro.org> > Signed-off-by: Markus Armbruster <arm...@redhat.com> > --- > util/qemu-option.c | 9 +++++++++ > 1 file changed, 9 insertions(+) > + * This code doesn't work for defaults && !list->merge_lists: when > + * params has no id=, and list has an element with !opts->id, it > + * appends a new element instead of returning the existing opts. > + * However, we got no use for this case. Guard against possible s/got/have/ Reviewed-by: Eric Blake <ebl...@redhat.com> -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature