]> git.ipfire.org Git - thirdparty/libvirt.git/commit
syntax-check: Add the rule to forbid whitespace before ";"
authorOsier Yang <jyang@redhat.com>
Tue, 21 May 2013 10:01:01 +0000 (18:01 +0800)
committerOsier Yang <jyang@redhat.com>
Wed, 22 May 2013 05:16:03 +0000 (13:16 +0800)
commitba0880b25c6505691efb8c6be26b4ce9176143da
treeb0dc9c38d8e8e69f8f5f25046373ed18c68c9234
parent1f49c0e138ebbb683fd9215f6e16d38d9ca4cd4d
syntax-check: Add the rule to forbid whitespace before ";"

Only a few cases are allowed:

1) The expression is empty for "for" loop, E.g.

  for (i = 0; ; i++)

2) An empty statement

  while (write(statuswrite, &status, 1) == -1 &&
         errno == EINTR)
      ; /* empty */

3) ";" is inside double-quote, I.e, as part of const string. E.g.

  vshPrint(ctl, "a ; b ; cd;\n");

The "for" loop in src/rpc/virnettlscontext.c is the special case,
1) applies for it, so change it together in this patch.
build-aux/bracket-spacing.pl
src/rpc/virnettlscontext.c