[Qemu-devel] [PATCH] qapi: Make visit_next_list()'s comment less confusing

Markus Armbruster posted 1 patch 4 years, 8 months ago
Test checkpatch passed
Test s390x passed
Test asan passed
Test docker-mingw@fedora passed
Test FreeBSD passed
Test docker-clang@ubuntu passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20190802122325.16520-1-armbru@redhat.com
Maintainers: Michael Roth <mdroth@linux.vnet.ibm.com>, Markus Armbruster <armbru@redhat.com>
include/qapi/visitor.h | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
[Qemu-devel] [PATCH] qapi: Make visit_next_list()'s comment less confusing
Posted by Markus Armbruster 4 years, 8 months ago
visit_next_list() returns non-null on success, null on failure.  The
comment's phrasing "until NULL return or error occurs" is needlessly
confusing.  Scratch the "or error occurs" part.

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

diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h
index 5b2ed3f202..c5b23851a1 100644
--- a/include/qapi/visitor.h
+++ b/include/qapi/visitor.h
@@ -364,10 +364,10 @@ void visit_start_list(Visitor *v, const char *name, GenericList **list,
  * @tail must not be NULL; on the first call, @tail is the value of
  * *list after visit_start_list(), and on subsequent calls @tail must
  * be the previously returned value.  Should be called in a loop until
- * a NULL return or error occurs; for each non-NULL return, the caller
- * then calls the appropriate visit_type_*() for the element type of
- * the list, with that function's name parameter set to NULL and obj
- * set to the address of @tail->value.
+ * a NULL return; for each non-NULL return, the caller then calls the
+ * appropriate visit_type_*() for the element type of the list, with
+ * that function's name parameter set to NULL and obj set to the
+ * address of @tail->value.
  */
 GenericList *visit_next_list(Visitor *v, GenericList *tail, size_t size);
 
-- 
2.21.0


Re: [Qemu-devel] [PATCH] qapi: Make visit_next_list()'s comment less confusing
Posted by Eric Blake 4 years, 8 months ago
On 8/2/19 7:23 AM, Markus Armbruster wrote:
> visit_next_list() returns non-null on success, null on failure.  The
> comment's phrasing "until NULL return or error occurs" is needlessly
> confusing.  Scratch the "or error occurs" part.
> 
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
>  include/qapi/visitor.h | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)

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

> 
> diff --git a/include/qapi/visitor.h b/include/qapi/visitor.h
> index 5b2ed3f202..c5b23851a1 100644
> --- a/include/qapi/visitor.h
> +++ b/include/qapi/visitor.h
> @@ -364,10 +364,10 @@ void visit_start_list(Visitor *v, const char *name, GenericList **list,
>   * @tail must not be NULL; on the first call, @tail is the value of
>   * *list after visit_start_list(), and on subsequent calls @tail must
>   * be the previously returned value.  Should be called in a loop until
> - * a NULL return or error occurs; for each non-NULL return, the caller
> - * then calls the appropriate visit_type_*() for the element type of
> - * the list, with that function's name parameter set to NULL and obj
> - * set to the address of @tail->value.
> + * a NULL return; for each non-NULL return, the caller then calls the
> + * appropriate visit_type_*() for the element type of the list, with
> + * that function's name parameter set to NULL and obj set to the
> + * address of @tail->value.
>   */
>  GenericList *visit_next_list(Visitor *v, GenericList *tail, size_t size);
>  
> 

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

Re: [Qemu-devel] [PATCH] qapi: Make visit_next_list()'s comment less confusing
Posted by Markus Armbruster 4 years, 8 months ago
Markus Armbruster <armbru@redhat.com> writes:

> visit_next_list() returns non-null on success, null on failure.  The
> comment's phrasing "until NULL return or error occurs" is needlessly
> confusing.  Scratch the "or error occurs" part.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>

Queued for 4.2.