qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v16 00/24] qapi visitor cleanups (post-introspec


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v16 00/24] qapi visitor cleanups (post-introspection cleanups subset E)
Date: Wed, 04 May 2016 15:54:29 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Uh, in visitor.h at the end of this series:

 * <example>
 *  Visitor *v;
 *  Error *err = NULL;
 *  int value;
 *
 *  v = ...obtain visitor...
 *  visit_start_struct(v, NULL, NULL, 0, &err);
 *  if (err) {
--->    goto outobj;
 *  }
 *  visit_start_list(v, "list", NULL, 0, &err);
 *  if (err) {
 *      goto outobj;
 *  }
 *  value = 1;
 *  visit_type_int(v, NULL, &value, &err);
 *  if (err) {
 *      goto outlist;
 *  }
 *  value = 2;
 *  visit_type_int(v, NULL, &value, &err);
 *  if (err) {
 *      goto outlist;
 *  }
 * outlist:
 *  visit_end_list(v);
 *  if (!err) {
 *      visit_check_struct(v, &err);
 *  }
 * outobj:
 *  visit_end_struct(v);
 *  error_propagate(errp, err);
 *  ...clean up v...
 * </example>

The ---> goto is wrong; we call visit_end_struct() after
visit_start_struct() failed.  Haven't dug through the patches to find
the guilty one.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]