On Mon, Aug 25, 2014 at 04:31:07PM -0600, Eric Blake wrote:
I noticed a line 'int nparams = 0;;' in remote_dispatch.h, and
tracked down where it was generated.  While at it, I found a
couple of other double semicolons.  Additionally, I noticed that
commit df0b57a95 left a stale reference to the file name
remote_dispatch_bodies.h.

* src/conf/numatune_conf.c (virDomainNumatuneNodeParseXML): Drop
empty statement.
* tests/virdbustest.c (testMessageStruct, testMessageSimple):
Likewise.
* src/rpc/gendispatch.pl (remote_dispatch_bodies.h): Likewise, and
update stale comments.

Signed-off-by: Eric Blake <ebl...@redhat.com>
---

Pushing under the trivial rule.

Syntax check can't easily catch this, because we want to allow
'for (int i = 0;; i++)' on a loop that uses break to exit, so
this is just done by manual inspection.


But trying ';;$' it looks like it can.  And trying it out it seems
there's still one place left.

Before your patch:

 git ls-files | grep '\.[chx]' | xargs grep ';;$'
src/conf/numatune_conf.c:    int n = 0;;
src/xenconfig/xen_common.c:        return -1;;
tests/virdbustest.c:    double in_double = 3.14159265359, out_double = 0;;
tests/virdbustest.c:    double in_double = 3.14159265359, out_double = 0;;

And after your patch:
 git ls-files | grep '\.[chx]' | xargs grep ';;$'
src/xenconfig/xen_common.c:        return -1;;

Martin

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to