[libvirt] [PATCH 3/7] Fix inconsistency in using curly braces around functions

Eric Blake eblake at redhat.com
Mon Mar 17 15:25:13 UTC 2014


On 03/17/2014 08:39 AM, Martin Kletzander wrote:
> Although not explicitly requested, we are using K&R (or Kernel)
> indentation for curly braces around functions in HACKING file and most
> of the code.  The rest is inconsistent and this patch is trying to fix
> the most of it.
> 
> Found by:
> 
> git grep -nH -e '^\s*\*\?[_a-zA-Z0-9]\+\(,\? \*\?[_a-zA-Z0-9]\+\)\+) \?{$' \
>  -e '^\s*[_a-zA-Z0-9]\+\( [_a-zA-Z0-9]\+\)*(\*\?[_a-zA-Z0-9]\+\(,\? \*\?[_a-zA-Z0-9]\+\)\+) \?{$
> 
> and skipped foreach constructs which were found as well.
> 
> Signed-off-by: Martin Kletzander <mkletzan at redhat.com>
> ---

This one's big.  I'm reluctant to ack as-is; I think it could use two
things: first, can you split it into a series of smaller patches
(convert one directory or so at a time); second, add a cfg.mk check to
enforce the style, so outliers don't sneak back in.


> +++ b/daemon/libvirtd-config.c

> @@ -156,7 +156,8 @@ checkType(virConfValuePtr p, const char *filename,
>      } while (0)
> 
> 
> -static int remoteConfigGetAuth(virConfPtr conf, const char *key, int *auth, const char *filename) {
> +static int remoteConfigGetAuth(virConfPtr conf, const char *key, int *auth, const char *filename)

Hmm, this line is still longer than 80 columns.  While touching this,
should we also do:

static int
remoteConfigGetAuth(virConfPtr conf,
                    const char *key,
                    int *auth,
                    const char *filename)


-- 
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: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20140317/d8fb8c78/attachment-0001.sig>


More information about the libvir-list mailing list