Re: [PATCH 1/2] unify header include order

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

 



On Tue, May 10, 2016 at 02:23:04PM +0100, Frediano Ziglio wrote:
> Use this style for include headers inside headers:
> 
>   #include <system_headers.h>
>   #include <no_spice_no_system_libraries.h>
>   #include <spice_protocol.h>
>   #include <spice_common.h>
> 
>   #include "spice_server.h"

I would add that to this coding style document if it's not already
there. I tend to prefer when the headers are alphabetically ordered 
within a given section (probably not worth changing throughout the
codebase now, but could be nice to keep an eye on that when adding new
#includes)


> diff --git a/server/red-channel.h b/server/red-channel.h
> index bc225c6..03e6407 100644
> --- a/server/red-channel.h
> +++ b/server/red-channel.h
> @@ -24,7 +24,6 @@
>  
>  #include <pthread.h>
>  #include <limits.h>
> -
>  #include <common/ring.h>
>  #include <common/marshaller.h>
>  
> diff --git a/server/red-common.h b/server/red-common.h
> index 3a63f04..b92bbee 100644
> --- a/server/red-common.h
> +++ b/server/red-common.h
> @@ -18,14 +18,14 @@
>  #ifndef _H_RED_COMMON
>  #define _H_RED_COMMON
>  
> -#include <glib.h>
> -
>  #include <errno.h>
>  #include <stdbool.h>
>  #include <stdint.h>
>  #include <string.h>
>  #include <unistd.h>
>  
> +#include <glib.h>
> +
>  #include <spice/macros.h>
>  #include <common/log.h>
>  #include <common/lz_common.h>

Nit, but this hunk and the previous one seems a bit inconsistent with
respect to the blank line. Do you want to group all <> #includes, or to
separate each different sections?

Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]