[libvirt] [PATCH] maint: drop spurious semicolons

Eric Blake eblake at redhat.com
Tue Aug 26 03:48:38 UTC 2014


On 08/25/2014 08:52 PM, Martin Kletzander wrote:
> 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.
>>

>>
>> 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.

Oh cool, looks like I have a followup patch to write, then.


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

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 539 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140825/29fb7bac/attachment-0001.sig>


More information about the libvir-list mailing list