[ovs-dev] [patch_v1] db-ctl-base: Use boolean variable values.

Ian Stokes ian.stokes at intel.com
Thu Jul 5 20:49:01 UTC 2018


On 7/5/2018 9:38 PM, Darrell Ball wrote:
> Traditionally, for boolean variables we use boolean values.
> Lets keep to that tradition.
> Hopefully, using false with a bool works with gcc 6.3.1;
> I use both recent versions of gcc (7.3) and older
> versions (4.x), but did not see the issue found in
> 165c1f0649af commit.
> 
> Cc: Ian Stokes<ian.stokes at intel.com>
> Fixes: 165c1f0649af ("db-ctl-base: Fix compilation warnings.")
> Signed-off-by: Darrell Ball <dlu998 at gmail.com>
> ---
>   lib/db-ctl-base.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/db-ctl-base.c b/lib/db-ctl-base.c
> index 1768b45..4af8489 100644
> --- a/lib/db-ctl-base.c
> +++ b/lib/db-ctl-base.c
> @@ -920,7 +920,7 @@ cmd_get(struct ctl_context *ctx)
>   
>       if (id) {
>           struct ovsdb_symbol *symbol = NULL;
> -        bool new = NULL;
> +        bool new = false;
>   
>           ctx->error = create_symbol(ctx->symtab, id, &symbol, &new);
>           if (ctx->error) {
> 

Apologies Darrell, silly mistake on my part. Compiled and tested ok.

Acked-by: Ian Stokes (ian.stokes at intel.com)


More information about the dev mailing list