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

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

 



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@xxxxxxxxxx>
> ---

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

Attachment: signature.asc
Description: OpenPGP digital signature

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]