9219d1
From a426e7292fc6a8c9d37e60abd0ff58eac983b18e Mon Sep 17 00:00:00 2001
9219d1
From: Numan Siddique <numans@ovn.org>
9219d1
Date: Thu, 11 Jun 2020 12:47:08 +0530
9219d1
Subject: [PATCH 21/22] Fix compilation error when configured with
9219d1
 --enable-sparse.
9219d1
9219d1
The below error is seen.
9219d1
9219d1
../controller/ovn-controller.c:2305:70: error: Using plain integer as NULL pointer
9219d1
make[1]: *** [Makefile:2000: controller/ovn-controller.o] Error 1
9219d1
make[1]: *** Waiting for unfinished jobs....
9219d1
9219d1
Fixes: 512b884dea3f("Add northd and ovn-controller cluster status reset commands.")
9219d1
CC: Mark Michelson <mmichels@redhat.com>
9219d1
Acked-by: Dumitru Ceara <dceara@redhat.com>
9219d1
Signed-off-by: Numan Siddique <numans@ovn.org>
9219d1
9219d1
(cherry-picked from upstream ovn master commit 10deb869fff9f0b6736523cf3bdf0d856035895b)
9219d1
9219d1
Change-Id: Iaff476538e85a9d68a1269cd55963edb5275dbe3
9219d1
---
9219d1
 controller/ovn-controller.c | 4 ++--
9219d1
 1 file changed, 2 insertions(+), 2 deletions(-)
9219d1
9219d1
diff --git a/controller/ovn-controller.c b/controller/ovn-controller.c
9219d1
index fe6048153..67b3cd989 100644
9219d1
--- a/controller/ovn-controller.c
9219d1
+++ b/controller/ovn-controller.c
9219d1
@@ -476,7 +476,7 @@ update_sb_db(struct ovsdb_idl *ovs_idl, struct ovsdb_idl *ovnsb_idl,
9219d1
     if (monitor_all_p) {
9219d1
         *monitor_all_p = monitor_all;
9219d1
     }
9219d1
-    if (*reset_ovnsb_idl_min_index) {
9219d1
+    if (reset_ovnsb_idl_min_index && *reset_ovnsb_idl_min_index) {
9219d1
         VLOG_INFO("Resetting southbound database cluster state");
9219d1
         engine_set_force_recompute(true);
9219d1
         ovsdb_idl_reset_min_index(ovnsb_idl);
9219d1
@@ -2571,7 +2571,7 @@ main(int argc, char *argv[])
9219d1
     if (!restart) {
9219d1
         bool done = !ovsdb_idl_has_ever_connected(ovnsb_idl_loop.idl);
9219d1
         while (!done) {
9219d1
-            update_sb_db(ovs_idl_loop.idl, ovnsb_idl_loop.idl, NULL, false);
9219d1
+            update_sb_db(ovs_idl_loop.idl, ovnsb_idl_loop.idl, NULL, NULL);
9219d1
             update_ssl_config(ovsrec_ssl_table_get(ovs_idl_loop.idl));
9219d1
 
9219d1
             struct ovsdb_idl_txn *ovs_idl_txn
9219d1
-- 
9219d1
2.26.2
9219d1