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

Darrell Ball dlu998 at gmail.com
Thu Jul 5 20:38:47 UTC 2018


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) {
-- 
1.9.1



More information about the dev mailing list