[PATCH 02/13] qapi: Fix the virtual walk example in visitor.h's big comment

Markus Armbruster posted 13 patches 5 years, 9 months ago
Maintainers: Max Reitz <mreitz@redhat.com>, Markus Armbruster <armbru@redhat.com>, Liu Yuan <namei.unix@gmail.com>, Michael Roth <mdroth@linux.vnet.ibm.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Kevin Wolf <kwolf@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Dr. David Alan Gilbert" <dgilbert@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>
There is a newer version of this series
[PATCH 02/13] qapi: Fix the virtual walk example in visitor.h's big comment
Posted by Markus Armbruster 5 years, 9 months ago
Call visit_check_list().  Missed in commit a4a1c70dc7 "qapi: Make
input visitors detect unvisited list tails".

Drop an irrelevant error_propagate() while there.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
---
 include/qapi/visitor.h | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h
index f8a0fc1ea9..7f63e4c381 100644
--- a/include/qapi/visitor.h
+++ b/include/qapi/visitor.h
@@ -215,6 +215,9 @@
  *      goto outlist;
  *  }
  * outlist:
+ *  if (!err) {
+ *      visit_check_list(v, &err);
+ *  }
  *  visit_end_list(v, NULL);
  *  if (!err) {
  *      visit_check_struct(v, &err);
@@ -222,7 +225,6 @@
  * outobj:
  *  visit_end_struct(v, NULL);
  * out:
- *  error_propagate(errp, err);
  *  visit_free(v);
  * </example>
  */
-- 
2.21.1


Re: [PATCH 02/13] qapi: Fix the virtual walk example in visitor.h's big comment
Posted by Eric Blake 5 years, 9 months ago
On 4/23/20 11:00 AM, Markus Armbruster wrote:
> Call visit_check_list().  Missed in commit a4a1c70dc7 "qapi: Make
> input visitors detect unvisited list tails".
> 
> Drop an irrelevant error_propagate() while there.

Aha - you found this because of your error cleanup work ;)

> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>   include/qapi/visitor.h | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
> 

Reviewed-by: Eric Blake <eblake@redhat.com>

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3226
Virtualization:  qemu.org | libvirt.org