Re: [PATCH spice-server v2] style: Change boolean style convention

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

 



Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

On Mon, Feb 27, 2017 at 12:21:15PM +0000, Frediano Ziglio wrote:
> Following
> https://lists.freedesktop.org/archives/spice-devel/2017-February/035800.html
> , the consensus was to use 'bool' rather than 'gboolean', and to use
> true/false rather than TRUE/FALSE. New code should attempt to follow
> the new style.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  docs/spice_style.txt | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 
> Changes since v1:
> - update commit message (Christophe Fergeau)
> 
> diff --git a/docs/spice_style.txt b/docs/spice_style.txt
> index 4614598..eb0e30e 100644
> --- a/docs/spice_style.txt
> +++ b/docs/spice_style.txt
> @@ -47,10 +47,18 @@ Examples: +
>    use `(var == 7)` instead of  `(7 == var)` +
>    use `(function(var) > 7)` instead of `(7 < function(var))`
>  
> -TRUE, FALSE and NULL
> +boolean type
> +------------
> +Where possible prefer the usage of `bool` type to store boolean.
> +
> +If not technically possible (ie libJPEG uses `boolean` while GLib uses `gboolean`) uses proper library type.
> +
> +Constants should be consistent with the type used so `true` and `false` for `bool` type.
> +
> +true, false and NULL
>  --------------------
>  
> -Use `TRUE`, `FALSE` and `NULL` instead of 1 and 0 in order to improve code readability.
> +Use `true`, `false` and `NULL` instead of 1 and 0 in order to improve code readability.
>  
>  Static storage initialization
>  -----------------------------
> -- 
> 2.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

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]